module TMail::StrategyInterface

Public Instance Methods

decoded( eol = "\n", charset = 'e', dest = nil ) click to toggle source

Returns the TMail object decoded and ready to be used by you, your program 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.

For Example:

email = TMail::Load(my_email_file)
email_to_send = email.encoded
# File lib/tmail/encode.rb, line 88
def decoded( eol = "\n", charset = 'e', dest = nil )
  # Turn the E-Mail into a string and return it with all
  # encoded characters decoded.  alias for to_s
  accept_strategy Decoder, eol, charset, dest
end
Also aliased as: to_s
encoded( eol = "\r\n", charset = 'j', dest = nil ) click to toggle source

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
# File lib/tmail/encode.rb, line 73
def encoded( eol = "\r\n", charset = 'j', dest = nil )
  accept_strategy Encoder, eol, charset, dest
end
to_s( eol = "\n", charset = 'e', dest = nil ) click to toggle source
Alias for: decoded