Email Server Override

By default, the email server settings are specified in the Configuration tab of each application. However, in some situations you may want to specify it outside of the application. You can do this by creating a file called emailserver.cfg, in the application's Files folder. If this file is in the WorkflowFirst Files folder, it will automatically be copied into the application when published. For the hosted platform, the file can also be placed in the account parent folder to override the email settings for all accounts.

 Here's an example email config:

Server=mail.myserver.com
 UserName=user@myserver.com
 Password=somepassword
 FromEMail=donotreply@myserver.com

The UserName and Password will be used to login to the email server. You can also specify the :tls suffix if the server requires a TLS login. The FromEMail will be the "from" email of the outgoing email. If, however, the application has its own From Email specified in the Configuration tab, then that email address will be used as the "Reply To" of the email (ie. it will be the email address any replies are sent to).

As well as overriding the server parameters, you can also enable centralized logging of all outgoing emails from the system. By entering something like this to the emailserver.cfg file:

LogFile=c:\logging\emails.log

The specified file will be appended to with information on every outgoing email. The log file will be tab-separated, with one line for each email. The following information is logged:

  • The date/time the email was sent (in sortable format)

  • The server name

  • The IP address of the user who initiated the email being sent, if any

  • If on a WorkflowFirst Hosted service, the account name from which the email was sent

  • The user name of the user who initiated the email being sent, if any

  • The To address of the email

  • The subject of the email

  • The first 120 characters of the email body

  • True if there were attachments, False is there were no attachments

This log file will be perpetually appended to. It is recommended that you periodically archive the file and delete it. By deleting the file, WorkflowFirst will automatically create a new file the next time a log entry is made.

If the system is not able to log the email, a system log entry is made with the error. If you do not see any log entries, you should check the system log.


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM