send_message

send_message(msgstr, from_addr, *to_addrs)
Instance Public methods

Sends msgstr as a message. Single CR (ârâ) and LF (ânâ) found in the msgstr, are converted into the CR LF pair. You cannot send a binary message with this method. msgstr should include both the message headers and body.

from_addr is a String representing the source mail address.

to_addr is a String or Strings or Array of Strings, representing the destination mail address or addresses.

Example

Net::SMTP.start('smtp.example.com') do |smtp|
  smtp.send_message msgstr,
                    'from@example.com',
                    ['dest@example.com', 'dest2@example.com']
end

Errors

This method may raise:

send_mail sendmail

doc_ruby_on_rails
2015-04-22 14:52:37
Comments
Leave a Comment

Please login to continue.