fetchEmail method
Get the contents of an email.
Notes:
- All HTML in the body of the email is filtered. Eg, Javascript, applets, iframes, etc is removed.
- All images in the email are relative to
https://www.guerrillamail.com/res.php - this script will generate a
blocked by GM
image, indicating that the image was blocked. The CGI parameters for this script are as follows: r = Is it a resource? 1 if true. Always 1 n= Node. The HTML element type. Can be a string of letters (a-z) q= The query string for the original image. This is URL Encoded Example URL: https://www.guerrillamail.com/res.php?r=1&n=img&q=http%3A%2F%2Fstatic.groupon.de%2Fnewsletter_ums%2Flogo_groupon_de_DE.gif
Implementation
Future<Message> fetchEmail(
/// The id of the email to fetch
int id,
) async {
final response = await _doRequest(
call: 'fetch_email',
queryParameters: {
'email_id': id.toString(),
},
);
return Message.fromJson(jsonDecode(response.body));
}