Increasing the number of mails that can be processed(Asynchronously) by a SMTP Agent simultaneously


In continuation to my previous post, the customer also had a SMTP Agent that was installed on a Edge Server and did context sensitive email analysis for incoming SMTP messages. In this case only 20 email could be processed by the SMTP Agent.

How were the SMTP messages being sent? The customer had a multithreaded application to send out mail. Fortunately, I was able to reproduce this too.In my case when I sent more than 20 mails using a multithreaded application, I ran into the following exception:

System.Runtime.InteropServices.COMException (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x800ccc67. The server
response was 421 4.3.2 The maximum number of concurrent connections has exceeded a limit, closing transmission channel   at CDO.MessageClass.Send()
   at SendSMTPMails.MassMailer.SendMail() in C:\SendSMTPMails\SendSMTPMails\Program.cs:line 63 Exception caught.

This is a restrictions on the Receive Connector in Exchange 2007. You will need to configure the receive connector to allow MaxInboundConnectionPerSource to a desired number. The default value is 20.

You can set the value by running the Set-ReceiveConnector cmdlet.

Cmdlet:Set-ReceiveConnector "Receive connector Name" -MaxInboundConnectionPerSource 100

Enjoy!

Comments (0)

Skip to main content