Public Member Functions | |
Email () | |
Email (string from, string to, string subject, string body) | |
Email (string to, string subject, string body) | |
Constructs an email. In this constructor version, The Email object will get the From address from configuration file, when Email is send. | |
void | ProcessTemplate (Dictionary< string, string > context) |
Modifies email string properties so everywhere there a variable like $FOO, it will be replaced by context["FOO"] . | |
override string | ToString () |
Static Public Member Functions | |
static string | GetHtmlFromText (string text) |
static string | GetTextFromHtml (string html) |
Properties | |
DateTime | SendingTime [get, set] |
Gets last sending time (even if there was a failure). If email is scheduled to send in the future, then SendingTime keeps the time when email should be send. | |
EmailStatus | SendingStatus [get, set] |
Gets the email sending status. See EmailStatus class for details. | |
string | From [get, set] |
Gets or sets the from address for this e-mail message. | |
string | To [get, set] |
Gets or sets the address that contains the recipient of this e-mail message. | |
string | Cc [get, set] |
Gets or sets the address that contains the carbon copy (CC) recipient of this e-mail message. | |
string | Bcc [get, set] |
Gets or sets the address that contains the blind carbon copy (BCC) recipient of this e-mail message. | |
string | ReplyTo [get, set] |
Gets or sets the ReplyTo address for the mail message. | |
string | Sender [get, set] |
Gets or sets the sender's address for the mail message. | |
List< string > | FileAttachments [get] |
string | Subject [get, set] |
Gets or sets the subject line for this e-mail message. | |
string | Body [get, set] |
Gets or sets the message body. | |
bool | IsBodyHtml [get, set] |
Gets or sets a value indicating whether the mail message body is in Html format (or plain text). | |
bool | AltView [get, set] |
Gets or sets a value indicating whether the email should have generated alternate view (html or text). If the body is the html it will generate the plain text and vice versa. | |
MailPriority | Priority [get, set] |
Gets or sets email priority. | |
Private Member Functions | |
internal MailMessage | ConstructMailMessage () |
void | cnvStringToMailAddressCollection (string s, MailAddressCollection c) |
Private Attributes | |
DateTime | sendingTime |
EmailStatus | sendingStatus = new EmailStatus() |
string | from |
string | to |
string | cc |
string | bcc |
string | replyTo |
string | sender |
List< string > | fileAttachments = new List<string>() |
string | subject = "" |
string | body = "" |
bool | isBodyHtml |
bool | altView = true |
MailPriority | priority = MailPriority.Normal |
Static Private Attributes | |
static TemplateEngine | engine = new TemplateEngine(true) |
Definition at line 34 of file Email.cs.
MarekMailSystem2.Email.Email | ( | string | from, | |
string | to, | |||
string | subject, | |||
string | body | |||
) |
Definition at line 39 of file Email.cs.
References MarekMailSystem2.Email.Body, MarekMailSystem2.Email.From, MarekMailSystem2.Email.Subject, and MarekMailSystem2.Email.To.
MarekMailSystem2.Email.Email | ( | string | to, | |
string | subject, | |||
string | body | |||
) |
Constructs an email. In this constructor version, The Email object will get the From address from configuration file, when Email is send.
Definition at line 52 of file Email.cs.
References MarekMailSystem2.Email.Body, MarekMailSystem2.Email.Subject, and MarekMailSystem2.Email.To.
void MarekMailSystem2.Email.ProcessTemplate | ( | Dictionary< string, string > | context | ) |
Modifies email string properties so everywhere there a variable like $FOO, it will be replaced by context["FOO"] .
context | dictonary of variable values |
Definition at line 227 of file Email.cs.
References MarekMailSystem2.Email.Bcc, MarekMailSystem2.Email.Body, MarekMailSystem2.Email.Cc, MarekMailSystem2.Email.engine, MarekMailSystem2.Email.From, MarekMailSystem2.TemplateEngine.Process(), MarekMailSystem2.Email.ReplyTo, MarekMailSystem2.Email.Sender, MarekMailSystem2.Email.Subject, and MarekMailSystem2.Email.To.
Referenced by MarekMailSystem2Tests.NormalTests.EmailTemplateTest1(), and MarekMailSystem2Tests.NormalTests.EmailTemplateTest2().
override string MarekMailSystem2.Email.ToString | ( | ) |
Definition at line 241 of file Email.cs.
References MarekMailSystem2.Email.AltView, MarekMailSystem2.Email.Bcc, MarekMailSystem2.Email.Body, MarekMailSystem2.Email.Cc, MarekMailSystem2.Email.FileAttachments, MarekMailSystem2.Email.From, MarekMailSystem2.Email.IsBodyHtml, MarekMailSystem2.Email.Priority, MarekMailSystem2.Email.ReplyTo, MarekMailSystem2.Email.Sender, MarekMailSystem2.Email.SendingStatus, MarekMailSystem2.Email.SendingTime, MarekMailSystem2.Email.Subject, and MarekMailSystem2.EmailStatus.ToString().
internal MailMessage MarekMailSystem2.Email.ConstructMailMessage | ( | ) | [private] |
Definition at line 268 of file Email.cs.
References MarekMailSystem2.Email.AltView, MarekMailSystem2.Email.Bcc, MarekMailSystem2.Email.Body, MarekMailSystem2.Email.Cc, MarekMailSystem2.Email.cnvStringToMailAddressCollection(), MarekMailSystem2.Email.FileAttachments, MarekMailSystem2.Email.From, MarekMailSystem2.Email.GetHtmlFromText(), MarekMailSystem2.Email.GetTextFromHtml(), MarekMailSystem2.Email.IsBodyHtml, MarekMailSystem2.Email.Priority, MarekMailSystem2.Email.ReplyTo, MarekMailSystem2.Email.Sender, MarekMailSystem2.Email.Subject, and MarekMailSystem2.Email.To.
Referenced by MarekMailSystem2.SmtpEmailSender.Send().
void MarekMailSystem2.Email.cnvStringToMailAddressCollection | ( | string | s, | |
MailAddressCollection | c | |||
) | [private] |
Definition at line 309 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage().
static string MarekMailSystem2.Email.GetHtmlFromText | ( | string | text | ) | [static] |
Definition at line 317 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage().
static string MarekMailSystem2.Email.GetTextFromHtml | ( | string | html | ) | [static] |
Definition at line 333 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage().
DateTime MarekMailSystem2.Email.sendingTime [private] |
EmailStatus MarekMailSystem2.Email.sendingStatus = new EmailStatus() [private] |
string MarekMailSystem2.Email.from [private] |
string MarekMailSystem2.Email.to [private] |
string MarekMailSystem2.Email.cc [private] |
string MarekMailSystem2.Email.bcc [private] |
string MarekMailSystem2.Email.replyTo [private] |
string MarekMailSystem2.Email.sender [private] |
List<string> MarekMailSystem2.Email.fileAttachments = new List<string>() [private] |
string MarekMailSystem2.Email.subject = "" [private] |
string MarekMailSystem2.Email.body = "" [private] |
bool MarekMailSystem2.Email.isBodyHtml [private] |
bool MarekMailSystem2.Email.altView = true [private] |
MailPriority MarekMailSystem2.Email.priority = MailPriority.Normal [private] |
TemplateEngine MarekMailSystem2.Email.engine = new TemplateEngine(true) [static, private] |
DateTime MarekMailSystem2.Email.SendingTime [get, set] |
Gets last sending time (even if there was a failure). If email is scheduled to send in the future, then SendingTime keeps the time when email should be send.
Definition at line 67 of file Email.cs.
Referenced by MarekMailSystem2.SmtpEmailSender.Send(), and MarekMailSystem2.Email.ToString().
EmailStatus MarekMailSystem2.Email.SendingStatus [get, set] |
Gets the email sending status. See EmailStatus class for details.
Definition at line 78 of file Email.cs.
Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), MarekMailSystem2Tests.NormalTests.EmailAltViewTest1(), MarekMailSystem2.SmtpEmailSender.Send(), MarekMailSystem2.EmailSender.Send(), MarekMailSystem2.EmailManager.Send(), MarekMailSystem2.EmailSender.SendTemplate(), MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest1(), MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest2(), and MarekMailSystem2.Email.ToString().
string MarekMailSystem2.Email.From [get, set] |
Gets or sets the from address for this e-mail message.
Definition at line 89 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.Email(), MarekMailSystem2.Email.ProcessTemplate(), and MarekMailSystem2.Email.ToString().
string MarekMailSystem2.Email.To [get, set] |
Gets or sets the address that contains the recipient of this e-mail message.
Definition at line 101 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.Email(), and MarekMailSystem2.Email.ProcessTemplate().
string MarekMailSystem2.Email.Cc [get, set] |
Gets or sets the address that contains the carbon copy (CC) recipient of this e-mail message.
Definition at line 113 of file Email.cs.
Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.ProcessTemplate(), and MarekMailSystem2.Email.ToString().
string MarekMailSystem2.Email.Bcc [get, set] |
Gets or sets the address that contains the blind carbon copy (BCC) recipient of this e-mail message.
Definition at line 124 of file Email.cs.
Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.ProcessTemplate(), and MarekMailSystem2.Email.ToString().
string MarekMailSystem2.Email.ReplyTo [get, set] |
Gets or sets the ReplyTo address for the mail message.
Definition at line 135 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.ProcessTemplate(), and MarekMailSystem2.Email.ToString().
string MarekMailSystem2.Email.Sender [get, set] |
Gets or sets the sender's address for the mail message.
Definition at line 147 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.ProcessTemplate(), and MarekMailSystem2.Email.ToString().
List<string> MarekMailSystem2.Email.FileAttachments [get] |
Definition at line 154 of file Email.cs.
Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), MarekMailSystem2.Email.ConstructMailMessage(), and MarekMailSystem2.Email.ToString().
string MarekMailSystem2.Email.Subject [get, set] |
Gets or sets the subject line for this e-mail message.
Definition at line 166 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.Email(), MarekMailSystem2.Email.ProcessTemplate(), and MarekMailSystem2.Email.ToString().
string MarekMailSystem2.Email.Body [get, set] |
Gets or sets the message body.
Definition at line 178 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.Email(), MarekMailSystem2Tests.NormalTests.EmailAltViewTest1(), MarekMailSystem2.Email.ProcessTemplate(), and MarekMailSystem2.Email.ToString().
bool MarekMailSystem2.Email.IsBodyHtml [get, set] |
Gets or sets a value indicating whether the mail message body is in Html format (or plain text).
Definition at line 190 of file Email.cs.
Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2Tests.NormalTests.EmailAltViewTest1(), and MarekMailSystem2.Email.ToString().
bool MarekMailSystem2.Email.AltView [get, set] |
Gets or sets a value indicating whether the email should have generated alternate view (html or text). If the body is the html it will generate the plain text and vice versa.
Definition at line 203 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2Tests.NormalTests.EmailAltViewTest1(), and MarekMailSystem2.Email.ToString().
MailPriority MarekMailSystem2.Email.Priority [get, set] |
Gets or sets email priority.
Definition at line 215 of file Email.cs.
Referenced by MarekMailSystem2.Email.ConstructMailMessage(), and MarekMailSystem2.Email.ToString().