Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Messages

SendMessage

DescriptionThe method allows the sending of a message to multiple recipients, the message content is passed as input in HTML or plain text. The message may also include attachments and embedded images.
HTTP MethodPOST
URLhttps://send.mailup.com/API/v2.0/messages/sendmessage
Reference
 Click here to learn more about request parameters

The method takes as input the document JSON or XML that has the structure MessageDTO defined in the tables below.

MessageDTO
ParameterTypeDescription
SubjectStringthe subject of the message
HtmlHtmlDTOthe HTML part of the message
TextStringthe plain text part of the message
FromEmailAddressDTOthe sender
ToList<EmailAddressDTO>the list of recipients in To header
CcList<EmailAddressDTO>the list of recipients in Cc header
BccList<EmailAddressDTO>the list of recipients in Bcc
ReplyToStringThe Reply-To header value
CharSetStringThe charset of the message body
ExtendedHeadersList<NameValueDTO>List of extended headers (only configured SMTP custom headers will be sent)
AttachmentsList<MessagePartDTO>List of attachments
EmbeddedImagesList<MessagePartDTO>list of embedded images
XSmtpAPIXSmtpAPIDTOthe X-SMTPAPI header value, used for custom aggregations and configurations
UserSmtpUserDTOthe SMTP+ user credentials

 

HtmlDTO
ParameterTypeDescription
DocTypeStringThe DOCTYPE directive
HeadStringThe head content
BodyStringThe body content
BodyTagStringthe body tag, default is "< body>"
EmailAddressDTO
ParameterTypeDescription
NameStringthe name
EmailStringthe email address
NameValueDTO
ParameterTypeDescription
NStringthe name of the parameter
VStringthe value of the parameter
MessagePartDTO
ParameterTypeDescription
FilenameStringthe file name
ContentIdStringthe Content-Id value
BodyArray of Bytethe array of byte of the content
XSmtpAPIDTO
ParameterTypeDescription
CampaignNameStringThe name used for the aggregated campaign
CampaignCodeStringThe campaign code which determines the aggregation
HeaderBooleanAdd or not the MailUp header to the message
FooterBooleanAdd or not the MailUp footer to the message
ClickTrackingBooleanUse the click tracking
ViewTrackingBooleanUse the view tracking
PriorityIntegerSet the priority of the message (1 high - 5 low )
ScheduleDateTimeSchedule date and time of the message
DynamicFieldsList<NameValueDTO>List of merge tags and dynamic field of the recipient
CampaignReportStringName of the aggregated campaign report
SkipDynamicFieldsBooleanskip merge tags evaluation
SmtpUserDTO
ParameterTypeDescription
UsernameStringthe username
PasswordStringthe password

 

 

 Click here to learn more about response parameters


SendResponseDTO
ParameterTypeDescription
StatusStringthe status of the response can be "done" or "error"
CodeStringthe result code (see the Error Code table)
MessageStringthe result message

 

 JSON request (example)
 Click here to expand...
{
"Html":
{
"DocType":null,
"Head":null,
"Body":"<div>Hello Mr. [firstname] [lastname] !!!</div><br><img width=\\"600\\" height=\\"397\\" src=\\"cid:img001\\">",
"BodyTag":"<body>"
},
"Text":"Hello world!!!",
"Subject":"Hello friend!",
"From":{"Name":"Test User","Email":"test@mailup.it"},
"To":[{"Name":"Massimo","Email":"info@mailup.it"}],
"Cc":[],
"Bcc":[],
"ReplyTo":null,
"CharSet":"utf-8",
"ExtendedHeaders":null,
"Attachments":null,
"EmbeddedImages":
[
{
"Filename":"Image.jpg",
"ContentId":"img001",
"Body":"..."
}
],
"XSmtpAPI":
{
"CampaignName":"Test Campaign",
"CampaignCode":"1001",
"Header":null,
"Footer":null,
"ClickTracking":null,
"ViewTracking":null,
"Priority":null,
"Schedule":null,
"DynamicFields":[{"N":"firstname","V":"Mario"},{"N":"lastname","V":"Rossi"}],
"CampaignReport":null,
"SkipDynamicFields":null
},
"User":{"Username":"sNNNNN_NN","Secret":"..."}
}
JSON response (example)
{
"Status":"done",
"Code":"0",
"Message":"Ok"
}

 

SendTemplate

DescriptionThe method allows the sending of a message to multiple recipients, the message content HTML and plain text is obtained from a template stored in the MailUp administration console. The message may also include attachments and embedded images.
HTTP MethodPOST
URLhttps://send.mailup.com/API/v2.0/messages/sendtemplate 
Reference
 Click here to learn more about request parameters


TemplateDTO
ParameterTypeDescription
SubjectStringthe subject of the message
TemplateIdIntegerthe Id of the template
FromEmailAddressDTOthe sender
ToList<EmailAddressDTO>the list of recipients in To header
CcList<EmailAddressDTO>the list of recipients in Cc header
BccList<EmailAddressDTO>the list of recipients in Bcc
ReplyToStringThe Reply-To header value
CharSetStringThe charset of the message body
ExtendedHeadersList<NameValueDTO>List of extended headers (only configured SMTP custom headers will be sent)
AttachmentsList<MessagePartDTO>List of attachments
EmbeddedImagesList<MessagePartDTO>list of embedded images
XSmtpAPIXSmtpAPIDTOthe X-SMTPAPI header value, used for custom aggregations and configurations
UserSmtpUserDTOthe SMTP+ user credentials

 See the SendMessage reference for reading the definition of the others DTO (EmailAddressDTO, NameValueDTO, ...)

 

 Click here to learn more about response parameters


SendResponseDTO
ParameterTypeDescription
StatusStringthe status of the response can be "done" or "error"
CodeStringthe result code (see the Error Code table)
MessageStringthe result message

 

JSON request (example)
 Click here to expand...
{
"TemplateId":694,
"Subject":"Test message from template",
"From":{"Name":"Test User","Email":"test@mailup.it"},
"To":[{"Name":"Massimo","Email":"info@mailup.it"}],
"Cc":[],
"Bcc":[],
"ReplyTo":null,
"CharSet":"utf-8",
"ExtendedHeaders":null,
"Attachments":null,
"EmbeddedImages":null,
"XSmtpAPI":null,
"User":{"Username":"sNNNNN_NN","Secret":"..."}
}
JSON response (example)
{
"Status":"done",
"Code":"0",
"Message":"Ok"
}

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

  • No labels