In the SendWithXML method, users are required to input the XMLDocument string which contains all the required information to deliver the emails. Below is an example of a successful XMLDocument to deliver emails.
<?xml version="1.0" encoding="UTF-8"?>
<EMAILLIST>
<CampaignName>campaign</CampaignName>
<ToEmail>ToEmail@gmail.com</ToEmail>
<Subject>This is a subject</Subject>
<SenderEmail>FromEmail@enginemailer.com</SenderEmail>
<SenderName>Engine Mailer</SenderName>
<SubmittedContent>Hello World</SubmittedContent>
<SubstitutionTags>
<VALUES>
<Key>Tag0</Key>
<Value>Value0</Value>
</VALUES>
<VALUES>
<Key>Tag1</Key>
<Value>Value1</Value>
</VALUES>
<VALUES>
<Key>Tag2</Key>
<Value>Value2</Value>
</VALUES>
<VALUES>
<Key>Tag3</Key>
<Value>Value3</Value>
</VALUES>
</SubstitutionTags>
<Attachments>
<File>
<Filename>Test1.pdf</Filename>
<Content>SG93IHRvIGRlYnVnIFNRTCBTdG9yZWQgUHJvY2VkdXJlDQoNCjEuIExvY2FsIG9ubHkgLSBBenVyZSAoTm8pDQoyLiBQdXQgYnJlYWtwb2ludCBhdCBFWEVDIHN0YXRlbWVudA0KMy4gQ2xpY2sgRGVidWcNCjQuIE9uY2UgaGl0IGJyZWFrcG9pbnQsIHByZXNzIEYxMSB0byBzdGVwIGludG8gdGhlIHN0b3JlZCBwcm9jZWR1cmUu</Content>
</File>
<File>
<Filename>Test2.pdf</Filename>
<Content>SG93IHRvIGRlYnVnIFNRTCBTdG9yZWQgUHJvY2VkdXJlDQoNCjEuIExvY2FsIG9ubHkgLSBBenVyZSAoTm8pDQoyLiBQdXQgYnJlYWtwb2ludCBhdCBFWEVDIHN0YXRlbWVudA0KMy4gQ2xpY2sgRGVidWcNCjQuIE9uY2UgaGl0IGJyZWFrcG9pbnQsIHByZXNzIEYxMSB0byBzdGVwIGludG8gdGhlIHN0b3JlZCBwcm9jZWR1cmUu</Content>
</File>
</Attachments>
<CCEmails>
<CCEmail>ccemail_1@gmail.com</CCEmail>
<CCEmail>ccemail_2@gmail.com</CCEmail>
</CCEmails>
<BCCEmails>
<BCCEmail>bccemail_1@gmail.com</BCCEmail>
<BCCEmail>bccemail_2@gmail.com</BCCEmail>
</BCCEmails>
<APIKey>YourSecondaryAPIKey</APIKey>
</EMAILLIST>
IMPORTANT: Please note that the XML document must be defined within the element tag of EMAILLIST. The EMAILLIST and VALUES are case sensitive.