Class

Mail

Extends:

Includes:

mail.rb

From action_mailer/vendor/tmail-1.2.2/tmail/obsolete.rb

facade.rb

Constants
ALLOW_MULTIPLE header
FIELD_ORDER
NOSEND_FIELDS
USE_ARRAY
Aliases
load_from
loadfrom
preamble
Public Attributes
port
Public Methods
[] Returns a TMail::AddressHeader object of the field you are querying. Examples:
[]= Allows you to set or delete TMail header objects at will. Eamples:
accept
add_date
add_message_id
attachment?
attachments
base64_decode Alias for #base64_decode!
base64_decode! Destructively convert the Mail object’s body into a Base64 decoded email returning the modified Mail object
base64_encode Alias for #base64_encode!
base64_encode! Destructively convert the Mail object’s body into a Base64 encoded email returning the modified Mail object
bcc Returns who the email bcc’d as an Array of email addresses as opposed to an Array of TMail::Address objects which is what Mail#to_addrs returns
bcc= Destructively sets the "Bcc:" field to the passed array of strings (which should be valid email addresses)
bcc_addrs Return a TMail::Addresses instance for each entry in the "Bcc:" field of the mail object header.
bcc_addrs= Destructively set the to field of the "Bcc:" header to equal the passed in string.
body
body=
body_port body
boundary
cc Returns who the email cc’d as an Array of email addresses as opposed to an Array of TMail::Address objects which is what Mail#to_addrs returns
cc= Destructively sets the "Cc:" field to the passed array of strings (which should be valid email addresses)
cc_addrs Return a TMail::Addresses instance for each entry in the "Cc:" field of the mail object header.
cc_addrs= Destructively set the to field of the "Cc:" header to equal the passed in string.
charset Returns the character set of the email. Returns nil if no encoding set or returns whatever default you pass as a parameter - note passing the parameter does NOT change the mail object in any way.
charset= Destructively sets the character set used by this mail object to the passed string, you should note though that this does nothing to the mail body, just changes the header value, you will need to transliterate the body as well to match whatever you put in this header value if you are changing character sets.
clear
content_disposition Alias for #disposition
content_disposition= Alias for #set_disposition
content_transfer_encoding Alias for #transfer_encoding
content_transfer_encoding= Alias for #transfer_encoding=
content_type Returns the current "Content-Type" of the mail instance.
content_type= Alias for #set_content_type
create_forward Creates a new email in reply to self. Sets the In-Reply-To and References headers for you automagically.
create_reply Creates a new email in reply to self. Sets the In-Reply-To and References headers for you automagically.
date Returns the date of the email message as per the "date" header value or returns nil by default (if no date field exists).
date= Destructively sets the date of the mail object with the passed Time instance, returns a Time instance set to the date/time of the mail
delete
delete_if
delete_no_send_fields
destinations Returns an array of each destination in the email message including to: cc: or bcc:
disposition Returns the content-disposition of the mail object, returns nil or the passed default value if given
disposition= Alias for #set_disposition
disposition_param Returns the value of a parameter in an existing content-disposition header
each
each_dest Alias for #each_destination
each_dest Alias for #each_destination
each_destination Yields a block of destination, yielding each as a string.
each_field
each_header Allows you to loop through each header in the TMail::Mail object in a block Example:
each_header_name
each_key Alias for #each_header_name
each_pair Alias for #each_header
each_part
each_value Alias for #each_field
encoding Alias for #transfer_encoding
encoding= Alias for #transfer_encoding=
epilogue
epilogue=
error_reply_addresses Returns the "sender" field as an array -> useful to find out who to send an error email to.
fetch Alias for #[]
friendly_from Returns the "friendly" human readable part of the address
from Returns who the email is from as an Array of email address strings instead to an Array of TMail::Address objects which is what Mail#from_addrs returns
from= Destructively sets the "From:" field to the passed array of strings (which should be valid email addresses)
from_addr
from_address
from_address= Alias for #from_addrs=
from_addrs Return a TMail::Addresses instance for each entry in the "From:" field of the mail object header.
from_addrs= Destructively set the to value of the "From:" header to equal the passed in string.
from_phrase
has_attachments?
has_key? Alias for #key?
has_value? Alias for #value?
header
header_string Allows you to query the mail object with a string to get the contents of the field you want.
in_reply_to Returns the "In-Reply-To:" field contents as an array of this mail instance if it exists
in_reply_to= Destructively sets the value of the "In-Reply-To:" field of an email.
include? Alias for #key?
indexes Alias for #values_at
indices Alias for #values_at
inspect
key?
keys
load
main_type Returns the current main type of the "Content-Type" of the mail instance.
message_id Returns the message ID for this mail object instance.
message_id= Destructively sets the message ID of the mail object instance to the passed in string
mime_encode
mime_encode_binary
mime_encode_multipart
mime_encode_singlepart
mime_encode_text
mime_version Returns the listed MIME version of this email from the "Mime-Version:" header field
mime_version=
msgid Alias for #message_id
msgid
msgid= Alias for #message_id=
multipart? Returns true if the Mail object is a multipart message
new
ordered_each
parse
parts
preamble= Alias for #body=
quoted_body
quoted_subject Alias for #subject
ready_to_send
references Returns the references of this email (prior messages relating to this message) as an array of message ID strings. Useful when you are trying to thread an email.
references= Destructively sets the value of the "References:" field of an email.
reply_addresses Returns an array of reply to addresses that the Mail object has, or if the Mail message has no reply-to, returns an array of the Mail objects from addresses. Else returns the default which can either be passed as a parameter or defaults to nil
reply_to Returns who the email is from as an Array of email address strings instead to an Array of TMail::Address objects which is what Mail#reply_to_addrs returns
reply_to= Destructively sets the "Reply-To:" field to the passed array of strings (which should be valid email addresses)
reply_to_addrs Return a TMail::Addresses instance for each entry in the "Reply-To:" field of the mail object header.
reply_to_addrs= Destructively set the to value of the "Reply-To:" header to equal the passed in argument.
send_text_to
send_to
send_to_0
sender Returns who the sender of this mail is as string instead to an Array of TMail::Address objects which is what Mail#sender_addr returns
sender= Destructively sets the "Sender:" field to the passed string (which should be a valid email address)
sender_addr Return a TMail::Addresses instance of the "Sender:" field of the mail object header.
sender_addr= Destructively set the to value of the "Sender:" header to equal the passed in argument.
set_content_disposition Alias for #set_disposition
set_content_type Destructively sets the "Content-Type:" header field of this mail object
set_disposition Allows you to set the content-disposition of the mail object. Accepts a type and a hash of parameters.
store Alias for #[]=
strftime Returns the time of the mail message formatted to your taste using a strftime format string. If no date set returns nil by default or whatever value you pass as the second optional parameter.
sub_header
sub_type Returns the current sub type of the "Content-Type" of the mail instance.
subject Returns the subject of the mail instance.
subject
subject= Destructively sets the passed string as the subject of the mail message.
to Returns who the email is to as an Array of email addresses as opposed to an Array of TMail::Address objects which is what Mail#to_addrs returns
to= Destructively sets the "To:" field to the passed array of strings (which should be valid email addresses)
to_addrs Return a TMail::Addresses instance for each entry in the "To:" field of the mail object header.
to_addrs= Destructively set the to field of the "To:" header to equal the passed in string.
transfer_encoding Returns the transfer encoding of the email. Returns nil if no encoding set or returns whatever default you pass as a parameter - note passing the parameter does NOT change the mail object in any way.
transfer_encoding= Destructively sets the transfer encoding of the mail object to the passed string, you should note though that this does nothing to the mail body, just changes the header value, you will need to encode or decode the body as well to match whatever you put in this header value.
type_param Returns the named type parameter as a string, from the "Content-Type:" header.
unquoted_body
value?
values
values_at
write_back
Private Methods
add_hf
canonical
do_send_to
new_hf
parse_body
parse_body_0
parse_header
read_multipart
skip_header
with_multipart_encoding
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.