SendEmails
Description
Send emails
long SendEmails(string key, string projectId, string sender, string subject, string body, LinkType includeLink, MailFormat mailFormat, BodyFormat bodyFormat, string customText, bool isPanel, string encoding, RespondentFilter respondentFilter, bool activateLogging)
Parameters
Name | Data Type | Description |
---|---|---|
key |
string required |
The authentication key |
projectId |
string required |
The project ID |
sender |
string required |
Email address from which this email will appear to be sent |
subject |
string required |
Subject-part of the mail |
body |
string required |
Body-part (Main message) of the mail |
includeLink |
LinkType required |
Type of link to the survey that should be attached (Normal,Secure,None) |
mailFormat |
MailFormat required |
Format of the mail (Mime,Text) |
bodyFormat |
BodyFormat required |
Format of the body (HTML,Text) |
customText |
string required |
A custom message for the message sent to the email sender |
isPanel |
bool required |
Type of project (Normal project,Panel) |
encoding |
string required |
Encoding type (Central European (Windows), Cyrillic (DOS), Chinese Traditional,…) |
respondentFilter |
RespondentFilter required |
Filter respondents to receive the mail |
activateLogging |
bool required |
True will log information every on every email sent, False will turn deactivate logging. |
Example
//***************************************************
//
// Send Emails
//
//***************************************************
// Create instance of the webservice
SurveyDeployerSoapClient surveyDeployer = new SurveyDeployerSoapClient();
// Send a survey invitation to all respondents that
// have not completed the survey and with
// firstname equal 'John'
RespondentFilter respondentFilter = new RespondentFilter();
respondentFilter.Status = RespondentStatus.Incomplete;
respondentFilter.Fields = new String[] {"FirstName"};
respondentFilter.FieldValues = new String[] {"='John'"};
surveyDeployer.SendEmails(key,projectID,"sender@dummy.com",
"Hello everybody!","Please open the enclosed survey.",
LinkType.RegularLink,MailFormat.Text,BodyFormat.Text,
"",false,"utf-8",respondentFilter,false);