GetRespondentEmailLogByTime

Description

Gets the email log entries, that are logged during a respondent emailing task, based on time lag.

Only entries that are logged for the authenticated user will be returned. In addition to the fields specified by the "fieldName" input parameter, two standard fields will be in the data set: * TimeStamp The time when the entry was logged. * TaskId The task id of the email task that logged the entry.
Signature
DataSet GetRespondentEmailLogByTime(string key, string projectId, string[] fieldNames, DateTime from, DateTime to)

Parameters

Name Data Type Description

key

string required

The authentication key

projectId

string required

The project ID

fieldNames

string[ ] required

The respondent field names that should be in the returned result.

from

DateTime required

The start date/time of the log entries selection.

to

DateTime required

The end date/time of the log entries selection.

Response

Data Type Description

DataSet

The email log entries.

Example

//***************************************************
//
// Get the respondent email log by date
//
// Before this method has any use, email must
// been sent to respondents with the logging option
// activated. This can be achieved through the
// "SendEmails" method on the "SurveyDeployer" web
// service.
//
//***************************************************

// Initiate webservice
SurveyDataSoapClient sd = new SurveyDataSoapClient();

//Specifies the respondent-fields that we will have
//returned in the result.
string[] fields = new string[]{"email"};

// Get the email log.
DataSet result = sd.GetRespondentEmailLogByTime(key,
    projectID,fields,
    DateTime.Now.Subtract(TimeSpan.FromDays(1)),DateTime.Now);
//Do something with the result.