string
LoginEmail =
"spread@reasonables.com"
;
string
APIKey =
"spread"
;
//Define recipient email
string
To =
"noclone@reasonables.com"
;
//Content Information
string
TemplateId =
"1"
;
string
Subject =
"Title"
;
string
SubstitutionVars =
"{\"[CUSTOM]\":\"Value\"}"
;
//Language Information
string
CreativeLanguage =
"en"
;
//Attachment Information
SpreadWebService.
CampaignAttachment[]
files =
new
SpreadWebService.
CampaignAttachment
[2];
SpreadWebService.
CampaignAttachment
AttachmentA =
new
SpreadWebService.
CampaignAttachment
();
AttachmentA.file =
File
.ReadAllBytes(
"Desktop/FileA.txt"
)
AttachmentA.fileType =
".jpg"
;
AttachmentA.displayName =
"FileA.jpg"
;
SpreadWebService.
CampaignAttachment
AttachmentB =
new
SpreadWebService.
CampaignAttachment
();
AttachmentB.file =
File
.ReadAllBytes(
"Desktop/FileB.txt"
)
AttachmentB.fileType =
".jpg"
;
AttachmentB.displayName =
"FileB.jpg"
;
files[0] =
AttachmentA
;
files[1] =
AttachmentB
;
//Create a SpreadWebService object and use its method.
SpreadWebService
MySpread =
new
SpreadWebService
();
string
result = MySpread.SendTemplateAttachments(LoginEmail,APIKey,To,TemplateId,
Subject,SubstitutionVars,CreativeLanguage,files);