Messages
To access this resource and use the methods, you must have a SMTP+ user enabled. Usename and password must be included in each request.
SendMessage
...
title | 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 |
---|
Parameter | Type | Description |
---|
Subject | String | the subject of the message |
Html | HtmlDTO | the HTML part of the message |
Text | String | the plain text part of the message |
From | EmailAddressDTO | the sender |
To | List<EmailAddressDTO> | the list of recipients in To header |
Cc | List<EmailAddressDTO> | the list of recipients in Cc header |
Bcc | List<EmailAddressDTO> | the list of recipients in Bcc |
ReplyTo | String | The Reply-To header value |
CharSet | String | The charset of the message body |
ExtendedHeaders | List<NameValueDTO> | List of extended headers (only configured SMTP custom headers will be sent) |
Attachments | List<MessagePartDTO> | List of attachments |
EmbeddedImages | List<MessagePartDTO> | list of embedded images |
XSmtpAPI | XSmtpAPIDTO | the X-SMTPAPI header value, used for custom aggregations and configurations |
User | SmtpUserDTO | the SMTP+ user credentials |
HtmlDTO |
---|
Parameter | Type | Description |
---|
DocType | String | The DOCTYPE directive |
Head | String | The head content |
Body | String | The body content |
BodyTag | String | the body tag, default is "< body>" |
EmailAddressDTO |
---|
Parameter | Type | Description |
---|
Name | String | the name |
Email | String | the email address |
NameValueDTO |
---|
Parameter | Type | Description |
---|
N | String | the name of the parameter |
V | String | the value of the parameter |
MessagePartDTO |
---|
Parameter | Type | Description |
---|
Filename | String | the file name |
ContentId | String | the Content-Id value |
Body | Array of Byte | the array of byte of the content |
XSmtpAPIDTO |
---|
Parameter | Type | Description |
---|
CampaignName | String | The name used for the aggregated campaign |
CampaignCode | String | The campaign code which determines the aggregation |
Header | Boolean | Add or not the MailUp header to the message |
Footer | Boolean | Add or not the MailUp footer to the message |
ClickTracking | Boolean | Use the click tracking |
ViewTracking | Boolean | Use the view tracking |
Priority | Integer | Set the priority of the message (1 high - 5 low ) |
Schedule | DateTime | Schedule date and time of the message |
DynamicFields | List<NameValueDTO> | List of merge tags and dynamic field of the recipient |
CampaignReport | String | Name of the aggregated campaign report |
SkipDynamicFields | Boolean | skip merge tags evaluation |
SmtpUserDTO |
---|
Parameter | Type | Description |
---|
Username | String | the username |
Secret | String | the password |
...
Messages
To access this resource and use the methods, you must have a SMTP+ user enabled. Usename and password must be included in each request.
SendMessage
Description | The 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 Method | POST |
---|
URL | https://send.mailup.com/API/v2.0/messages/sendmessage
|
---|
Reference | Expand |
---|
title | 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 |
---|
Parameter | Type | Description |
---|
Subject | String | the subject of the message | Html | HtmlDTO | the HTML part of the message | Text | String | the plain text part of the message | From | EmailAddressDTO | the sender | To | List<EmailAddressDTO> | the list of recipients in To header | Cc | List<EmailAddressDTO> | the list of recipients in Cc header | Bcc | List<EmailAddressDTO> | the list of recipients in Bcc | ReplyTo | String | The Reply-To header value | CharSet | String | The charset of the message body | ExtendedHeaders | List<NameValueDTO> | List of extended headers (only configured SMTP custom headers will be sent) | Attachments | List<MessagePartDTO> | List of attachments | EmbeddedImages | List<MessagePartDTO> | list of embedded images | XSmtpAPI | XSmtpAPIDTO | the X-SMTPAPI header value, used for custom aggregations and configurations | User | SmtpUserDTO | the SMTP+ user credentials |
HtmlDTO |
---|
Parameter | Type | Description |
---|
DocType | String | The DOCTYPE directive | Head | String | The head content | Body | String | The body content | BodyTag | String | the body tag, default is "< body>" |
EmailAddressDTO |
---|
Parameter | Type | Description |
---|
Name | String | the name | Email | String | the email address |
NameValueDTO |
---|
Parameter | Type | Description |
---|
N | String | the name of the parameter | V | String | the value of the parameter |
MessagePartDTO |
---|
Parameter | Type | Description |
---|
Filename | String | the file name | ContentId | String | the Content-Id value | Body | Array of Byte | the array of byte of the content |
XSmtpAPIDTO |
---|
Parameter | Type | Description |
---|
CampaignName | String | The name used for the aggregated campaign | CampaignCode | String | The campaign code which determines the aggregation | Header | Boolean | Add or not the MailUp header to the message | Footer | Boolean | Add or not the MailUp footer to the message | ClickTracking | Boolean | Use the click tracking | ViewTracking | Boolean | Use the view tracking | Priority | Integer | Set the priority of the message (1 high - 5 low ) | Schedule | DateTime | Schedule date and time of the message | DynamicFields | List<NameValueDTO> | List of merge tags and dynamic field of the recipient | CampaignReport | String | Name of the aggregated campaign report | SkipDynamicFields | Boolean | skip merge tags evaluation |
SmtpUserDTO |
---|
Parameter | Type | Description |
---|
Username | String | the username | Secret | String | the password |
|
Expand |
---|
title | Click here to learn more about response parameters |
---|
|
SendResponseDTO |
---|
Parameter | Type | Description |
---|
Status | String | the status of the response can be "done" or "error" | Code | String | the result code (see the Error Code table) | Message | String | the result message |
|
|
---|
JSON request (example) | 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) | Example of a successful response: { "Status":"done", "Code":"0", "Message":"Ok" } Example of error: { "Status":"error", "Code":"102", "Message":"The operation is not authorized." } |
---|
SendTemplate
Description | The 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 Method | POST |
---|
URL | https://send.mailup.com/API/v2.0/messages/sendtemplate |
---|
Reference | Expand |
---|
title | Click here to learn more about response request parameters |
---|
|
SendResponseDTOTemplateDTO |
---|
Parameter | Type | Description | Status
---|
Subject | String | the subject of the message | TemplateId | Integer | the status of the response can be "done" or "error" | Code | String | the result code (see the Error Code table) | Message | String | the result message |
|
| JSON request (example) | 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 }Id of the template | From | EmailAddressDTO | the sender | To | List<EmailAddressDTO> | the list of recipients in To header | Cc | List<EmailAddressDTO> | the list of recipients in Cc header | Bcc | List<EmailAddressDTO> | the list of recipients in Bcc | ReplyTo | String | The Reply-To header value | CharSet | String | The charset of the message body | ExtendedHeaders | List<NameValueDTO> | List of extended headers (only configured SMTP custom headers will be sent) | Attachments | List<MessagePartDTO> | List of attachments | EmbeddedImages | List<MessagePartDTO> | list of embedded images | XSmtpAPI | XSmtpAPIDTO | the X-SMTPAPI header value, used for custom aggregations and configurations | User | SmtpUserDTO | the SMTP+ user credentials |
See the SendMessage reference for reading the definition of the others DTO (EmailAddressDTO, NameValueDTO, ...) |
Expand |
---|
title | Click here to learn more about response parameters |
---|
|
SendResponseDTO |
---|
Parameter | Type | Description |
---|
Status | String | the status of the response can be "done" or "error" | Code | String | the result code (see the Error Code table) | Message | String | the result message |
|
|
---|
JSON request (example) | 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) | Example of a successful response: { "Status":"done", "Code":"0", "Message":"Ok" }} Example of error: { "Status":"error", "Code":"102111", "Message":"The operationtemplate is not authorizedfound." } |
---|
SendTemplate
...
Users
To access this resource and use the methods, you must have a SMTP+ user enabled. Usename and password must be included in each request.
ListUserInfo
Description | The method provides the list of SMTP+ users associated to the distribution list of caller. |
---|
HTTP Method | POST |
---|
URL | https://send.mailup.com/API/v2.0/messagesusers/sendtemplatelistuserinfo |
---|
Reference | JSON response (example) | Example of a successful response: { "Status":"done", "Code":"0", "Message":"Ok" Expand |
---|
title | Click here to learn more about request parameters |
---|
| TemplateDTO |
---|
Parameter | Type | Description |
---|
Subject | String | the subject of the message | TemplateId | Integer | the Id of the template | From | EmailAddressDTO | the sender | To | List<EmailAddressDTO> | the list of recipients in To header | Cc | List<EmailAddressDTO> | the list of recipients in Cc header | Bcc | List<EmailAddressDTO> | the list of recipients in Bcc | ReplyTo | String | The Reply-To header value | CharSet | String | The charset of the message body | ExtendedHeaders | List<NameValueDTO> | List of extended headers (only configured SMTP custom headers will be sent) | Attachments | List<MessagePartDTO> | List of attachments | EmbeddedImages | List<MessagePartDTO> | list of embedded images | XSmtpAPI | XSmtpAPIDTO | the X-SMTPAPI header value, used for custom aggregations and configurations | User | SmtpUserDTO | the SMTP+ user credentials |
See the SendMessage reference for reading the definition of the others DTO (EmailAddressDTO, NameValueDTO, ...) Expand |
---|
title | Click here to learn more about response parameters |
---|
| SendResponseDTO |
---|
Parameter | Type | Description |
---|
Status | String | the status of the response can be "done" or "error" | Code | String | the result code (see the Error Code table) | Message | String | the result message |
|
---|
JSON request (example) | 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":"..."} } |
|
---|
The request must contain the user's credentials and an optional username to query ListUsersDTO |
---|
Parameter | Type | Description |
---|
User | SMTPUserDTO | the calling User | Username | String | optional User from which to read the profile, if omitted the method returns the whole list of users |
|
Expand |
---|
title | Click here to learn more about response parameters |
---|
| The response is given by a JSON or XML document that has the structure of a list of users informations ( List<UserInfoDTO>). UserInfoDTO |
---|
Parameter | Type | Description |
---|
Username | SMTPUserDTO | the username | IdConsole | long | the console ID | IdList | long | the list Id | IsEnabled | bool | true if the user is enabled | Priority | int | the priority | Note | string | note | CreationDate | datetime | creation date | UpdateDate | datetime | last update date | DomainList | string | the list of allowed domains | SenderList | string | the list of allowed sender | BlockUntil | datetime | the date until the user is blocked | AdminBlock | bool | true if the user is blocked by the system administrator |
|
|
JSON request (example) | {"User":{"Username":"sNNNN_NN","Secret":"..."},"Username":"sMMMM_MM"} |
---|
JSON response (example) | Example of a successful response: { "Status":"done", "Code":"0", "Message":"Ok", "UserList": [ { "Username":"sMMMM_MM", "IdConsole":123, "IdList":1, "IsEnabled":true, "Priority":3, "Note":"", "CreationDate":"2015-03-31T12:12:04", "UpdateDate":"2015-03-31T12:12:34", "DomainList":"", "SenderList":"", "BlockUntil":"0001-01-01T00:00:00", "AdminBlock":false } ] } Example of error: { "Status":"error", "Code":"111112", "Message":"TheUser template is not founddeleted." } |
---|
...
Error code
This table contains the list of error codes that can be returned by the API methods.
| |
---|
0 | Ok |
1 | The operation is failed. |
101 | The input is null. |
102 | The operation is not authorized. |
103 | The user is not enabled. |
104 | The user is blocked. |
105 | The user is blocked until this date. |
106 | The console account is not found. |
107 | The console account is suspended. |
108 | The console account is deleted. |
109 | At least one recipient is required. |
110 | The sender is mandatory. |
111 | The template is not found. |
| 112 | User is deleted. |