Email Messaging
This page lists the optional parameters, request data and reponse in xml
Send email messages [HTTP POST]
https://appapi.dlangemobile.com/xml/email/{api_key}/send?send_date={send_date}&start_time={start_time}&end_time={end_time}
URL Parameters
- api_key (Required) - Your API application key.
Query string Parameters
- send_date (Optional) - Date to send the message. Must be in yyyy-MM-dd format. This is required if start_time and end_time is provided.
- start_time (Optional) - Start time to send the message. Must be in hh:mm format. This is required if send_date and end_time is provided.
- end_time (Optional) - End time to send the message. Must be in hh:mm format. This is required if send_date and start_time is provided.
Request Notes
- Subject - Subject of message to be sent.
- Content - Content of message to be sent. If the content contains HTML tags, you will need to HTML-encode it first.
- RecipientContacts - List of contact ID's set as recipients.
- RecipientGroups - List of group ID's set as recipients.
- EmailAddresses - List of email addresses to set as recipients.
Example XML Request
<EmailInfo>
<Subject>my email subject</Subject>
<Content>my email body</Content>
<RecipientContacts>
<int>2</int>
<int>34</int>
</RecipientContacts>
<RecipientGroups>
<int>45</int>
<int>78</int>
</RecipientGroups>
<EmailContacts>
<EmailContact>
<FirstName>Test</FirstName>
<LastName>Contact 1</LastName>
<EmailAddress>contact1@domain.com</EmailAddress>
</EmailContact>
</EmailContacts>
</EmailInfo>
Response Notes
- 1 - Message is sent successfully
- 2 - No valid recipients
- 3 - Invalid email address
- 4 - Invalid contact ID
- 5 - Invalid group ID
Example XML Response
<int>1</int>
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 505 - Invalid start or end time. Times must be in hh:mm format and between 00:00 to 23:59.
- 506 - Start time should be earlier than end time.
- 507 - Include at least one recipient.
- 508 - Message contains one or more invalid email addresses.
- 509 - No email subject in the request XML data.
- 510 - No email message in the request XML data.
- 513 - Message contains no valid recipients..
- 514 - Message contains one or more non-existing group IDs.
- 515 - Message contains one or more non-existing contact IDs.
- 516 - Provide a valid message info. Request XML data is invalid or not passed as post data.
- 518 - This method is not allowed for reseller accounts.
- 519 - Invalid send date. Date must be in yyyy-MM-dd format.