date( default = nil )
-> Time
date=( datetime: Time )
-
a time object of Date: header field.
strftime( format: String, default = nil )
-> String
-
is equals to date.strftime(format)
.
If date is not exist, this method does nothing and
returns default.
to( default = nil )
-> Array of String
to=( addrs: String/Array of String )
-
address specs for To: header field.
to_addrs( default = nil )
-> Array of TMail::Address
to_addrs=( addrs:
TMail::Address/Array of TMail::Address )
-
adresses which is represented in To: header field.
cc( default = nil )
-> Array of String
cc=( addrs: String/Array of String )
-
address specs for Cc: header field.
cc_addrs( default = nil )
-> Array of TMail::Address
cc_addrs=( addrs:
TMail::Address/Array of TMail::Address )
-
adresses which is represented in Cc: header field.
bcc( default = nil )
-> Array of String
bcc=( addrs: String/Array of String )
-
address specs for Bcc: header field.
bcc_addrs( default = nil )
-> Array of TMail::Address
bcc_addrs=( addrs:
TMail::Address/Array of TMail::Address )
-
adresses which is represented in Bcc: header field.
from( default = nil )
-> Array of String
from=( addrs: String/Array of String )
-
address specs for From: header field.
from_addrs( default = nil )
-> Array of TMail::Address
from_addrs=( addrs:
TMail::Address/Array of TMail::Address )
-
adresses which is represented in From: header field.
friendly_from( default = nil )
-> String
-
a phrase part or address spec of first From: address.
reply_to( default = nil )
-> Array of String
reply_to=( addrs: String/Array of String )
-
address specs for Reply-To: header field.
reply_to_addrs( default = nil )
-> Array of TMail::Address
reply_to_addrs=( addrs:
TMail::Address/Array of TMail::Address )
-
adresses which is represented in Reply-To: header field.
sender( default = nil )
-> String
sender=( addr: String )
-
address spec for Sender: header field.
sender_addr( default = nil )
-> TMail::Address
sender_addr=( addr:
TMail::Address )
-
adress which is represented in Sender: header field.
subject( default = nil )
-> String
subject=( sbj: String )
-
the subject of the mail message.
message_id( default = nil )
-> String
message_id=( id: String )
-
message id string.
in_reply_to( default = nil )
-> Array of String
in_reply_to=( ids: String/Array of String )
-
message IDs of replying mails.
references( default = nil )
-> Array of String
references=( ids: String/Array of String )
-
message IDs of all referencing (replying) mails.
mime_version( default = nil )
-> String
mime_version=( ver: String )
-
MIME version.
If it does not exist, returns the DEFAULT.
set_mime_version( major: Integer, minor: Integer )
-
set MIME version from integers.
content_type( default = nil )
-> String
-
the content type of the mail message (e.g. "text/plain").
If it does not exist, returns the default.
main_type( default = nil )
-> String
-
the main content type of the mail message. (e.g. "text")
If it does not exist, returns the default.
sub_type( default = nil )
-> String
-
the sub content type of the mail message. (e.g. "plain")
If it does not exist, returns the default.
content_type=( main_sub: String )
-
set content type to STR.
set_content_type( main: String, sub: String, params: Hash = nil )
-
set Content-type: header as "main/sub; param=val; param=val; ...".
type_param( name: String, default = nil )
-> String
-
returns the value corresponding to the case-insensitive
name of Content-Type parameter.
If it does not exist, returns the default.
# example
mail['Content-Type'] = 'text/plain; charset=iso-2022-jp'
p mail.type_param('charset') # "iso-2022-jp"
multipart?
-> bool
-
judge if this mail is MIME multi part mail,
by inspecting Content-Type: header field.
transfer_encoding( default = nil )
-> String
transfer_encoding=( str: String )
-
Content-Transfer-Encoding. (e.g. "7bit" "Base64")
disposition( default = nil )
-> String
disposition=( disp: String )
-
Content-Disposition main value (e.g. "attach").
If it does not exist, returns the DEFAULT.
# example
mail['Content-Disposition'] = 'attachement; filename="test.rb"'
p mail.disposition # "attachment"
set_content_disposition( pos: String, params: Hash = nil )
-
set content disposition.
params is a Hash, like {"name"=>"value"}.
disposition_param( name: String, default = nil )
-> String
-
returns a value corresponding to the Content-Disposition
parameter name (e.g. filename).
If it does not exist, returns the default.
# example
mail.disposition_param('filename')
destinations( default = nil )
-> Array of String
-
all address specs which are contained in To:, Cc: and
Bcc: header fields.
reply_addresses( default = nil )
-> Array of TMail::Address
-
addresses to we reply to.
error_reply_addresses( default = nil )
-> Array of TMail::Address
-
addresses to use when returning error message.