@@ -781,6 +781,7 @@ def initialize(master)
781781 # - [Hash] to[] a single recipient's information.
782782 # - [String] email the email address of the recipient
783783 # - [String] name the optional display name to use for the recipient
784+ # - [String] type the header type to use for the recipient, defaults to "to" if not provided
784785 # - [Hash] headers optional extra headers to add to the message (most headers are allowed)
785786 # - [Boolean] important whether or not this message is important, and should be delivered ahead of non-important messages
786787 # - [Boolean] track_opens whether or not to turn on open tracking for the message
@@ -857,6 +858,7 @@ def send(message, async=false, ip_pool=nil, send_at=nil)
857858 # - [Hash] to[] a single recipient's information.
858859 # - [String] email the email address of the recipient
859860 # - [String] name the optional display name to use for the recipient
861+ # - [String] type the header type to use for the recipient, defaults to "to" if not provided
860862 # - [Hash] headers optional extra headers to add to the message (most headers are allowed)
861863 # - [Boolean] important whether or not this message is important, and should be delivered ahead of non-important messages
862864 # - [Boolean] track_opens whether or not to turn on open tracking for the message
@@ -931,7 +933,7 @@ def send_template(template_name, template_content, message, async=false, ip_pool
931933 # - [String] _id the message's unique id
932934 # - [String] sender the email address of the sender
933935 # - [String] template the unique name of the template used, if any
934- # - [String] subject the message's subject link
936+ # - [String] subject the message's subject line
935937 # - [String] email the recipient email address
936938 # - [Array] tags list of tags on this message
937939 # - [String] tags[] individual tag on this message
@@ -993,7 +995,7 @@ def search_time_series(query='*', date_from=nil, date_to=nil, tags=nil, senders=
993995 # - [String] _id the message's unique id
994996 # - [String] sender the email address of the sender
995997 # - [String] template the unique name of the template used, if any
996- # - [String] subject the message's subject link
998+ # - [String] subject the message's subject line
997999 # - [String] email the recipient email address
9981000 # - [Array] tags list of tags on this message
9991001 # - [String] tags[] individual tag on this message
@@ -1024,6 +1026,32 @@ def info(id)
10241026 return @master . call 'messages/info' , _params
10251027 end
10261028
1029+ # Get the full content of a recently sent message
1030+ # @param [String] id the unique id of the message to get - passed as the "_id" field in webhooks, send calls, or search calls
1031+ # @return [Hash] the content of the message
1032+ # - [Integer] ts the Unix timestamp from when this message was sent
1033+ # - [String] _id the message's unique id
1034+ # - [String] from_email the email address of the sender
1035+ # - [String] from_name the alias of the sender (if any)
1036+ # - [String] subject the message's subject line
1037+ # - [Hash] to the message recipient's information
1038+ # - [String] email the email address of the recipient
1039+ # - [String] name the alias of the recipient (if any)
1040+ # - [Array] tags list of tags on this message
1041+ # - [String] tags[] individual tag on this message
1042+ # - [Hash] headers the key-value pairs of the custom MIME headers for the message's main document
1043+ # - [String] text the text part of the message, if any
1044+ # - [String] html the HTML part of the message, if any
1045+ # - [Array] attachments an array of any attachments that can be found in the message
1046+ # - [Hash] attachments[] information about an individual attachment
1047+ # - [String] name the file name of the attachment
1048+ # - [String] type the MIME type of the attachment
1049+ # - [String] content the content of the attachment as a base64 encoded string
1050+ def content ( id )
1051+ _params = { :id => id }
1052+ return @master . call 'messages/content' , _params
1053+ end
1054+
10271055 # Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces
10281056 # @param [String] raw_message the full MIME document of an email message
10291057 # @return [Hash] the parsed message
0 commit comments