In Files
Methods
Information
Class Index
- Ratch
- Ratch::Batch
- Ratch::CLI
- Ratch::ConfigUtils
- Ratch::Console
- Ratch::EmailUtils
- Ratch::Emailer
- Ratch::FTPUtils
- Ratch::FileList
- Ratch::FileNotFound
- Ratch::Help
- Ratch::POMUtils
- Ratch::RDocUtils
- Ratch::Script
- Ratch::Shell
- Ratch::System
- Ratch::TarUtils
- Ratch::XDGUtils
- Ratch::ZlibUtils
- FileTest
- Hash
- NilClass
- Object
- String
EmailUtils
The Mail utility module provides an easy to use email method.
Public Instance Methods
email(options)
click to toggle source
Email function to easily send out an email.
Settings:
subject Subject of email message. from Message FROM address [email]. to Email address to send announcemnt. server Email server to route message. port Email server's port. domain Email server's domain name. account Email account name if needed. password Password for login.. login Login type: plain, cram_md5 or login [plain]. secure Uses TLS security, true or false? [false] message Mesage to send -or- file File that contains message.
# File lib/ratch/utils/email.rb, line 23 23: def email(options) 24: options[:file] = localize(options[:file]) if options[:file] 25: emailer = Emailer.new(options.rekey) 26: success = emailer.email 27: if Exception === success 28: puts "Email failed: #{success.message}." 29: else 30: puts "Email sent successfully to #{success.join(';')}." 31: end 32: end
Disabled; run with --debug to generate this.