I have an on premises CRM 2015 installation with on premises Exchange 2010 setup and I enabled Server Side Sync for outgoing e-mail. This is done via a SMTP server profile with anonymous SMTP relaying (via the normal port 25) from the CRM backend server to Exchange.
When I approve the e-mail address and 'Test & Enable' my mailbox, the normal CRM Testmail is correctly send and delivered to my mailbox / Outlook. So the Server Side Sync configuration seems to be configured correctly. But when I create e-mails in CRM and send them, they aren't delivered and stay in the "Pending Send" state (or "Waiting to be send" don't know the exact English state name here, my setup is in Dutch) in CRM.
I already checked the following:
- Organization mail settings;
- Personal mail settings;
- Server mail profile settings;
- Personal mailbox settings;
- Disabled custom plugins and even some CRM system plugins;
- Checked the Event Log, no errors there;
- Made a server Trace on front- and backend servers. No mail or SMTP errors there. The only clues I see are:
[1] The e-mail delivery gets postponed with 30 minutes (the reason why, I don't see in the trace):
SET DEADLOCK_PRIORITY LOW BEGIN TRANSACTION UPDATE ActivityPointerBase SET DeliveryAttempts = COALESCE(DeliveryAttempts, 0) + 1, DeliveryLastAttemptedOn = '04/22/2016 10:03:40', PostponeActivityProcessingUntil = '04/22/2016 10:33:40' OUTPUT INSERTED.ActivityId, INSERTED.ActivityTypeCode, INSERTED.Subject, INSERTED.Description, INSERTED.PriorityCode, INSERTED.EmailAttachmentCount, INSERTED.SenderMailboxId, INSERTED.DeliveryAttempts, INSERTED.ConversationIndex, INSERTED.MessageId, INSERTED.InReplyTo WHERE ActivityId IN (SELECT TOP(1000) ActivityPointerBase.ActivityId FROM ActivityPointerBase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK) LEFT OUTER JOIN MailboxBase WITH (NOLOCK) ON (ActivityPointerBase.SenderMailboxId = MailboxBase.MailboxId) WHERE ( ( MailboxBase.EnabledForOutgoingEmail = 1 AND MailboxBase.PostponeSendingUntil <= '04/22/2016 10:03:40' AND 1 = 0 ) ) AND ActivityPointerBase.ActivityTypeCode = 4202 AND ActivityPointerBase.StateCode = 1 AND ActivityPointerBase.PostponeActivityProcessingUntil IS NOT NULL AND ActivityPointerBase.PostponeActivityProcessingUntil <= '04/22/2016 10:03:40' ORDER BY ActivityPointerBase.DeliveryPriorityCode DESC, ActivityPointerBase.ActualEnd ASC )
And a few seconds later, the mailbox seems to be getting disabled:
BEGIN TRANSACTION DECLARE @res INT EXEC @res = tempdb..sp_getapplock @Resource = 'MailboxQueue_app_lock-49a8d881-a524-e511-8116-005056a133e4', @LockMode = 'Exclusive' IF @res NOT IN (0, 1) BEGIN RAISERROR ( 'Unable to acquire App Lock', 16, 1 ) END ELSE BEGIN UPDATE Mailboxbase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK) SET HostId = 'XXXXXXXX.MSCRMAsyncService.c1fcae7d-d48b-4872-98f8-df2525f515e8', ModifiedOn = '04/22/2016 10:03:42',ProcessingLastAttemptedOn = '04/22/2016 10:03:42',ProcessingStateCode = 1, PostponeMailboxProcessingUntil = '12/31/9999 23:59:59' OUTPUT INSERTED.MailboxId, INSERTED.ReceivingPostponedUntil, INSERTED.NoEmailCount, INSERTED.ProcessEmailReceivedAfter, INSERTED.IsForwardMailbox, INSERTED.EmailAddress, INSERTED.ProcessAndDeleteEmails, INSERTED.LastMessageId, INSERTED.TestEmailConfigurationScheduled, INSERTED.PostponeTestEmailConfigurationUntil, INSERTED.EnabledForIncomingEmail, INSERTED.LastActiveOn, INSERTED.StateCode, INSERTED.IncomingEmailDeliveryMethod, INSERTED.PostponeMailboxProcessingUntil, INSERTED.MailboxProcessingContext, INSERTED.ActDeliveryMethod, INSERTED.EnabledForACT, INSERTED.ReceivingPostponedUntilForACT, INSERTED.NoACTCount,INSERTED.ProcessedTimes, INSERTED.AverageTotalDuration, INSERTED.LastDuration ,INSERTED.OrgMarkedAsPrimaryForExchangeSync ,INSERTED.LastSyncErrorCount, INSERTED.LastSyncErrorCode WHERE MailboxId IN (SELECT TOP (2500) MailboxId FROM MailboxBase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK) WHERE ( ProcessingStateCode = 0 AND PostponeMailboxProcessingUntil <= '04/22/2016 10:03:42' ) ORDER BY PostponeMailboxProcessingUntil ) EXEC @res = tempdb..sp_releaseapplock @Resource = 'MailboxQueue_app_lock-49a8d881-a524-e511-8116-005056a133e4' END COMMIT
Before I send a test mail I always approve the e-mail address and test and enable the mailbox.
But nothing works... Any help to get the e-mails to be sent is appreciated.
*This post is locked for comments