Method: TMail::StrategyInterface#encoded
- Defined in:
- lib/tmail/encode.rb
#encoded(eol = "\r\n", charset = 'j', dest = nil) ⇒ Object
:startdoc: Returns the TMail object encoded and ready to be sent via SMTP etc. You should call this before you are packaging up your email to correctly escape all the values that need escaping in the email, line wrap the email etc.
It is also a good idea to call this before you marshal or serialize a TMail object.
For Example:
email = TMail::Load(my_email_file)
email_to_send = email.encoded
73 74 75 |
# File 'lib/tmail/encode.rb', line 73 def encoded( eol = "\r\n", charset = 'j', dest = nil ) accept_strategy Encoder, eol, charset, dest end |