GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
GenerallyPositive.ReceivedEmail Class Reference

A simplified representation of a single email message retrieved by GPALMail.Receive. More...

Public Member Functions

ReceivedEmail MarkAsRead ()
 Marks this message as read on the server, so the next Receive set to unread only leaves it behind. Call it once the workflow has finished with the message rather than before, or a run that fails half way through has marked mail it never handled. IMAP only.
ReceivedEmail Delete ()
 Deletes this message from the server, flagging it and expunging it in the one call. IMAP only. Doing nothing is how a message is left on the server, which is the default for every message read.
List< GPALFile > SaveTo (GPALFile directory)
 Writes this message's attachments into the given directory, creating it when it is not there, and hands back a GPALFile for each one written. A file already there is replaced.

Properties

string Subject [get, set]
 The message's subject line.
string From [get, set]
 The message's "From" address, as a display string.
string Body [get, set]
 The plain-text body of the message, falling back to the html body when the sender wrote no text part.
string HtmlBody [get, set]
 The html body of the message, null when the sender wrote none.
DateTime Received [get, set]
 When the message was sent, in local time.
string MessageId [get, set]
 The message id the sender stamped on it, which is how the same message is recognised across runs.
List< string > Attachments = new List<string>() [get, set]
 The filename of each attachment on the message, so a workflow can tell what came with it. Empty when nothing was attached.

Detailed Description

A simplified representation of a single email message retrieved by GPALMail.Receive.

Definition at line 983 of file GPALMail.cs.

Member Function Documentation

◆ Delete()

ReceivedEmail GenerallyPositive.ReceivedEmail.Delete ( )

Deletes this message from the server, flagging it and expunging it in the one call. IMAP only. Doing nothing is how a message is left on the server, which is the default for every message read.

Returns
This message, so calls can be chained.

Definition at line 1021 of file GPALMail.cs.

◆ MarkAsRead()

ReceivedEmail GenerallyPositive.ReceivedEmail.MarkAsRead ( )

Marks this message as read on the server, so the next Receive set to unread only leaves it behind. Call it once the workflow has finished with the message rather than before, or a run that fails half way through has marked mail it never handled. IMAP only.

Returns
This message, so calls can be chained.

Definition at line 1010 of file GPALMail.cs.

◆ SaveTo()

List< GPALFile > GenerallyPositive.ReceivedEmail.SaveTo ( GPALFile directory)

Writes this message's attachments into the given directory, creating it when it is not there, and hands back a GPALFile for each one written. A file already there is replaced.

Parameters
directoryThe directory to write this message's attachments into
Returns
The files written, empty when the message had no attachments.

Definition at line 1038 of file GPALMail.cs.

Property Documentation

◆ Attachments

List<string> GenerallyPositive.ReceivedEmail.Attachments = new List<string>()
getset

The filename of each attachment on the message, so a workflow can tell what came with it. Empty when nothing was attached.

Definition at line 1027 of file GPALMail.cs.

◆ Body

string GenerallyPositive.ReceivedEmail.Body
getset

The plain-text body of the message, falling back to the html body when the sender wrote no text part.

Definition at line 990 of file GPALMail.cs.

◆ From

string GenerallyPositive.ReceivedEmail.From
getset

The message's "From" address, as a display string.

Definition at line 988 of file GPALMail.cs.

◆ HtmlBody

string GenerallyPositive.ReceivedEmail.HtmlBody
getset

The html body of the message, null when the sender wrote none.

Definition at line 992 of file GPALMail.cs.

◆ MessageId

string GenerallyPositive.ReceivedEmail.MessageId
getset

The message id the sender stamped on it, which is how the same message is recognised across runs.

Definition at line 996 of file GPALMail.cs.

◆ Received

DateTime GenerallyPositive.ReceivedEmail.Received
getset

When the message was sent, in local time.

Definition at line 994 of file GPALMail.cs.

◆ Subject

string GenerallyPositive.ReceivedEmail.Subject
getset

The message's subject line.

Definition at line 986 of file GPALMail.cs.


The documentation for this class was generated from the following file: