The PhoenixEmailService handles the transmission of email batches.
This topic contains the following sections.
Description
The PhoenixEmailService is a Windows service that starts automatically and "listens" for email batch files arriving in its pickup folder. The pickup folder is located at [Phoenix installation folder]\email_queue. If a new batch file is detected, it is loaded, parsed and each email is sent out.
|
ASPNET must be given write access to the pickup folder in order to successfully create email batch files. |
|
When this service is started (normally when Windows is loaded), any email batch files currently in the pickup folder are processed. If this service has been stopped for a long period of time prior to its starting, there may be a large number of batches waiting to be sent. |
Each email described in a batch file is sent out using the SMTP email server configured in the phoenixservices.exe.config file.
Batch files that were successfully sent are copied to the [Phoenix installation folder]\email_sent folder. In the event of a failure, an error message is logged, and the batch file is copied to the [Phoenix installation folder]\email_failed folder for review.
|
If you notice there are batch files in the email_failed folder, and this service is running, you can cut and paste (CTRL x, CTRL v) each file into the email_queue folder for immediate re-transmission. If it still cannot be sent, check the log file for any errors. |
The Email Batch File
The email batch file is simply an Xml file made up of email elements nested within a emails element. An email contains the sender and recipient information, as well as the subject and message body. The properties that make up the email element are shown below.
<email> <to>The address of the recipient</to> <from>The address of the sender</from> <subject>The subject of the email</subject> <body xml:space="preserve"> The body of the email. Only plain text message bodies are supported. </body> </email>
The email batch file below depicts two emails. During processing, each email will be sent out sequentially.
<?xml version="1.0" encoding="utf-8"?> <emails> <email> <to>joeneckbone@noemail.com</to> <from>admin@phoenix.com</from> <subject>Request to Delete Workspace</subject> <body xml:space="preserve"> Dear Joe Neckbone, A workspace from http://yournode.phoenix.com was deleted from the system. Note: Please do not reply to this email. It was automatically generated. </body> </email> <email> <to>samsneed@noemail.com</to> <from>admin@phoenix.com</from> <subject>Request to Delete Workspace</subject> <body xml:space="preserve"> Dear Sam Sneed, A workspace from http://yournode.phoenix.com was deleted from the system. Note: Please do not reply to this email. It was automatically generated. </body> </email> </emails>
The log file
This service writes diagnostic information in a plain text log file which can be found at [Phoenix install folder]\logs\email.log. The amount of information that is written can be controlled by starting the service with an additional debug parameter.
When the service is started in debug mode, the details of each email are logged in the event of a transmission failure.
For more information on starting and stopping services see The PhoenixServices.
