MarekMailSystem2.EmailManager Class Reference

This is the main class. Most of the time you will use only this class to send emails. More...

Inheritance diagram for MarekMailSystem2.EmailManager:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 EmailManager (IEmailTable ErrorTable, IEmailTable TemplateTable, IEmailSender EmailSender)
 Constructs an email manager with provided email tables and email sender. More ofted you will use default (parameterless) constructor. TODO: is the word 'parameterless' correct?
 EmailManager ()
 Defaul email manager constructor.
EmailStatus SendSavedTemplate (string TemplateName, Dictionary< string, string > context)
 Sends an email using a template. The 'To' address is also read trom the template. If you want to set the 'To' address, use the overloaded version of this method.
EmailStatus SendSavedTemplate (string To, string TemplateName, Dictionary< string, string > context)
 Sends an email using a template.
override void Send (Email email)
 Sends an arbitrary email.

Private Attributes

IEmailTable ErrorTable
IEmailTable TemplateTable
IEmailSender EmailSender


Detailed Description

This is the main class. Most of the time you will use only this class to send emails.

Definition at line 11 of file EmailManager.cs.


Constructor & Destructor Documentation

MarekMailSystem2.EmailManager.EmailManager ( IEmailTable  ErrorTable,
IEmailTable  TemplateTable,
IEmailSender  EmailSender 
)

Constructs an email manager with provided email tables and email sender. More ofted you will use default (parameterless) constructor. TODO: is the word 'parameterless' correct?

Parameters:
ErrorTable An email table where failure emails will be saved.
TemplateTable An email template table used to get templates.
EmailSender A sender used to send emails.

Definition at line 29 of file EmailManager.cs.

MarekMailSystem2.EmailManager.EmailManager (  ) 

Defaul email manager constructor.

Definition at line 40 of file EmailManager.cs.


Member Function Documentation

EmailStatus MarekMailSystem2.EmailManager.SendSavedTemplate ( string  TemplateName,
Dictionary< string, string >  context 
)

Sends an email using a template. The 'To' address is also read trom the template. If you want to set the 'To' address, use the overloaded version of this method.

Parameters:
TemplateName Name of the template to use.
context Context used to create an email from the template
Returns:
Result of sending the email. (see EmailStatus class)

Definition at line 59 of file EmailManager.cs.

References MarekMailSystem2.IEmailTable.Load(), MarekMailSystem2.EmailSender.SendTemplate(), and MarekMailSystem2.EmailManager.TemplateTable.

Referenced by MarekMailSystem2Tests.NormalTests.EmailManagerTemplateTest1(), MarekMailSystem2Tests.NormalTests.EmailManagerTemplateTest2(), and MarekMailSystem2Tests.NormalTests.EmailManagerTemplateTest3().

EmailStatus MarekMailSystem2.EmailManager.SendSavedTemplate ( string  To,
string  TemplateName,
Dictionary< string, string >  context 
)

Sends an email using a template.

Parameters:
To Email receipment address.
TemplateName Name of the template to use.
context Context used to create an email from the template
Returns:
Result of sending the email. (see EmailStatus class)

Definition at line 73 of file EmailManager.cs.

References MarekMailSystem2.IEmailTable.Load(), MarekMailSystem2.EmailSender.SendTemplate(), and MarekMailSystem2.EmailManager.TemplateTable.

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

Sends an arbitrary email.

Parameters:
email 

Implements MarekMailSystem2.EmailSender.

Definition at line 95 of file EmailManager.cs.

References MarekMailSystem2.EmailManager.ErrorTable, MarekMailSystem2.IEmailTable.Save(), MarekMailSystem2.Email.SendingStatus, and MarekMailSystem2.EmailStatus.Status.

Referenced by MarekMailSystem2SimpleWebUI._Default.ButtonSend_Click(), MarekMailSystem2Tests.NormalTests.EmailManagerTest1(), and MarekMailSystem2Tests.NormalTests.EmailManagerTest2().


Member Data Documentation

IEmailTable MarekMailSystem2.EmailManager.ErrorTable [private]

Definition at line 17 of file EmailManager.cs.

Referenced by MarekMailSystem2.EmailManager.Send().

IEmailTable MarekMailSystem2.EmailManager.TemplateTable [private]

Definition at line 18 of file EmailManager.cs.

Referenced by MarekMailSystem2.EmailManager.SendSavedTemplate().

IEmailSender MarekMailSystem2.EmailManager.EmailSender [private]

Definition at line 19 of file EmailManager.cs.


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