getEmailList method
Gets a maximum of 20 messages from the specified offset. Offset of 0 will fetch a list of the first 10 emails, offset of 10 will fetch a list of the next 10, and so on.
This function is useful for populating the initial email list, if you want to check for new mail use check_mail. Note: When returned, subject and email excerpt are escaped using HTML Entities.
Implementation
Future<CheckEmailResponse> getEmailList({
/// How many emails to start from (skip). Starts from 0
int offset = 0,
/// The sequence number (id) of the oldest email
int? sequenceNumber,
}) async {
final response = await _doRequest(
call: 'get_email_list',
queryParameters: {
'offset': offset.toString(),
if (sequenceNumber != null) 'seq': sequenceNumber.toString(),
},
);
return CheckEmailResponse.fromJson(jsonDecode(response.body));
}