MarekMailSystem2.SmtpEmailSender Class Reference

This class represents smtp client with can connect to some smtp server and send an email. Smtp server details can be set in configuration file (TODO: not implemented yet) or through this class properties. More...

Inheritance diagram for MarekMailSystem2.SmtpEmailSender:

Inheritance graph
[legend]
Collaboration diagram for MarekMailSystem2.SmtpEmailSender:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SmtpEmailSender ()
override void Send (Email email)
 Tries to send email. It also sets email.SendingStatus and sets email.SendingTime to DateTime.Now() One can read email.SendingStatus to check if there was any problem.
void SendSchedule (Email email, DateTime time)

Protected Attributes

SmtpClient client

Properties

string Host [get, set]
int Port [get, set]
bool Ssl [get, set]
bool UseDefaultCredentials [get, set]
 Some SMTP servers require that the client be authenticated before the server sends e-mail on its behalf. Set this property to true when this SmtpEmailClient object should, if requested by the server, authenticate using the default credentials of the currently logged on user. When this property is set to true, the UserName and the Password properties are not used.
string UserName [get, set]
string Password [get, set]

Private Member Functions

void updateCredentials ()

Private Attributes

string userName
string password


Detailed Description

This class represents smtp client with can connect to some smtp server and send an email. Smtp server details can be set in configuration file (TODO: not implemented yet) or through this class properties.

Definition at line 15 of file SmtpEmailSender.cs.


Constructor & Destructor Documentation

MarekMailSystem2.SmtpEmailSender.SmtpEmailSender (  ) 

Definition at line 19 of file SmtpEmailSender.cs.

References MarekMailSystem2.SmtpEmailSender.client.


Member Function Documentation

void MarekMailSystem2.SmtpEmailSender.updateCredentials (  )  [private]

Definition at line 73 of file SmtpEmailSender.cs.

References MarekMailSystem2.SmtpEmailSender.client, MarekMailSystem2.SmtpEmailSender.password, and MarekMailSystem2.SmtpEmailSender.userName.

override void MarekMailSystem2.SmtpEmailSender.Send ( Email  email  )  [virtual]

Tries to send email. It also sets email.SendingStatus and sets email.SendingTime to DateTime.Now() One can read email.SendingStatus to check if there was any problem.

Parameters:
email An email to be send.

Implements MarekMailSystem2.EmailSender.

Definition at line 85 of file SmtpEmailSender.cs.

References MarekMailSystem2.SmtpEmailSender.client, MarekMailSystem2.Email.ConstructMailMessage(), MarekMailSystem2.Email.SendingStatus, and MarekMailSystem2.Email.SendingTime.

Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), MarekMailSystem2Tests.NormalTests.EmailAltViewTest1(), MarekMailSystem2Tests.NormalTests.EmailTemplateTest2(), MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest1(), and MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest2().

void MarekMailSystem2.SmtpEmailSender.SendSchedule ( Email  email,
DateTime  time 
)

Definition at line 135 of file SmtpEmailSender.cs.


Member Data Documentation

SmtpClient MarekMailSystem2.SmtpEmailSender.client [protected]

Definition at line 17 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2.SmtpEmailSender.Send(), MarekMailSystem2.SmtpEmailSender.SmtpEmailSender(), and MarekMailSystem2.SmtpEmailSender.updateCredentials().

string MarekMailSystem2.SmtpEmailSender.userName [private]

Definition at line 57 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2.SmtpEmailSender.updateCredentials().

string MarekMailSystem2.SmtpEmailSender.password [private]

Definition at line 65 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2.SmtpEmailSender.updateCredentials().


Property Documentation

string MarekMailSystem2.SmtpEmailSender.Host [get, set]

Definition at line 26 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), and MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest2().

int MarekMailSystem2.SmtpEmailSender.Port [get, set]

Definition at line 32 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), and MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest2().

bool MarekMailSystem2.SmtpEmailSender.Ssl [get, set]

Definition at line 38 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), and MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest2().

bool MarekMailSystem2.SmtpEmailSender.UseDefaultCredentials [get, set]

Some SMTP servers require that the client be authenticated before the server sends e-mail on its behalf. Set this property to true when this SmtpEmailClient object should, if requested by the server, authenticate using the default credentials of the currently logged on user. When this property is set to true, the UserName and the Password properties are not used.

Definition at line 52 of file SmtpEmailSender.cs.

string MarekMailSystem2.SmtpEmailSender.UserName [get, set]

Definition at line 60 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), and MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest2().

string MarekMailSystem2.SmtpEmailSender.Password [get, set]

Definition at line 68 of file SmtpEmailSender.cs.

Referenced by MarekMailSystem2SimpleWinUI.FormMarekMailSystem2SimpleWinUI.buttonSend_Click(), and MarekMailSystem2Tests.NormalTests.SmtpEmailSenderTest2().


The documentation for this class was generated from the following file:
Generated on Thu Oct 25 11:32:59 2007 for Marek Mail System by  doxygen 1.5.3-20071008