Layton ServiceDesk - Troubleshooting - Outgoing Email Stops
Changing Email Server Settings
If you need to change your email server settings, please schedule a time when you can change them, then restart the World Wide Web Publishing Service and LaytonServiceDesk service in the Windows Services console. Restarting the World Wide Web Publishing Services is disruptive and Layton ServiceDesk will be unavailable to users while it is restarting.
Failure to restart these services will not purge the old details from memory, and Layton ServiceDesk will continue to try to use the old settings, causing failures to import and send mail.
Checking the Layton ServiceDesk Service
Layton ServiceDesk uses its LaytonServiceDesk service to periodically check the outgoing email queue for pending emails and send them. The first thing to check is whether or not the service is running.
The service is configured by default to run under the Local System Account, although in some instances this has had to be changed.
- Open the Windows Services console.
- Find the service LaytonServiceDesk. Check to see if it's running or is stopped.
- If it's not running, start it.
- If it won't start, send any error message to Support. If the Services console does not give an error, there will be one in Event Viewer. Copy the error(s) and send to Support.
Checking Site-Specific Email Settings
Usually only the global Email Server Settings are configured, to be used for all email related to Layton ServiceDesk, however, it's possible to configure different email settings for different sites. Check that these are correct, or delete the site-specific settings.
Checking Email Notification Settings
In order for the system to send email notifications regarding various events, they need to be enabled in Administration > Libraries > Email Settings & Bodies. You might not be having difficulty in the system sending emails, but specific notifications are not being sent. This may be the cause. Check that the notifications you want have been enabled.
Basic Remedy
Email can stop being processed due to unusual characters in an email. This is the most basic and immediate remedy.
Using the Layton ServiceDesk Interface
- Go to Administration > System Settings > Email Server Settings.
- Click the View Pending Outgoing Emails link.
- A list of outgoing emails will appear:
- Here you can see that the earliest email could not be sent. Click the check box for that email, then click the Delete button above the list.
- Restart the LaytonServiceDesk service in the Windows Services console.
- The rest of the emails should now be sent within a few seconds. If not, click the check box in the header to select all emails and click the Re-Send button:
- If the emails still don't send, repeat the process. Don't delete more than three emails, as this could indicate a different issue, most likely a misconfiguration of email settings.
Using Microsoft SQL Server Management Studio
If you can't load the Layton ServiceDesk Outgoing-Email interface, this is usually due a very large amount of unprocessed mail. You can use Management Studio instead.
- Launch Microsoft SQL Server Management Studio.
- Run this query:
DELETE FROM [LaytonServiceDesk].[dbo].[mail] WHERE sys_mail_id = (SELECT TOP 1 sys_mail_id FROM [LaytonServiceDesk].[dbo].[mail] ORDER BY sys_mail_id ASC)
Restart the LaytonServiceDesk service in the Windows Services console.
Checking that the Issue is Resolved
If the issue is resolved, email will start being sent out again and the Layton ServiceDesk queue will load. You can use this query to check the count. By executing it repeatedly, you should see the count decrease.
SELECT COUNT (sys_mail_id) AS "Outgoing Email Count" FROM [LaytonServiceDesk].[dbo].[mail]
Re-sending Failed Emails
If your email server goes offline, once recovered, you may find that your Pending list contains failed emails. You can delete these or use this SQL query to change the status back to Pending:
UPDATE [LaytonServiceDesk].[dbo].[mail]
SET sys_mail_tried = 0 ,sys_mail_status = 'Pending' ,sys_mail_lasttrytime = NULL
Restart the LaytonServiceDesk service in the Windows Services console. These emails should now send.
Bulk Delete
If the list is full of failed emails, you can quickly eliminate all email with this SQL query:
TRUNCATE TABLE [LaytonServiceDesk].[dbo].[mail]
Many Failures
If you are getting many outgoing failures, check the email settings.
All Mail in Pending Status
If all or most of the outgoing emails have the status Pending, then most likely the LaytonServiceDesk service is not running, and if it's not running, you will probably find that you can't start it. If you get an error message related to a startup timeout, this remedy should fix it.
Microsoft Office 365
A Microsoft Office 365 user found that email was not being sent out when configured to use a third-party email server. Microsoft instructed him to use these settings: