When sending thousands of Emails it is necessary to manage how fast those Emails are sent. It is important to keep in mind that the Universal Messenger just generates (personalizes) the Emails and connects with SMTP server(s) to deliver them.
How fast the Emails are actually delivered to the recipient eventually depends on how fast the SMTP server is. The Universal Messenger is generally capable of generating thousands of personalized Emails per second but it is very unlikely that one single SMTP server can send them as fast.
You can therefore finely tune how the UM sends its Emails to the SMTP server(s) (all values are defined in cmsbs.properties
):
cmsbs.mail.threads = 3
maximum number of concurrent connectionscmsbs.mail.delay = 100
time between two outgoing Emails within the same connection (in ms)cmsbs.smtp.maxIdleTime = 120
maximum idle time for a connectioncmsbs.smtp.maxUseTime = 1800
maximum time a connection can be usedcmsbs.smtp.maxMails = 5
maximum number of Emails sent through a single connection
Keep in mind that if you send the Emails too slowly it might take too long over all to deliver all Emails. However if you send the Emails to quickly you might overload your SMTP server.
Details (in German): https://www.universal-messenger.de/knowledge-base/intern/01_faqs/faq_smtp_performance/index.html
Multiple SMTP relays
It is possible to use more than one SMTP server to send your Emails.
cmsbs.mail.relays = a b c
cmsbs.mail.relay.a.smtpserver = “smtp-a.local.example.com”
cmsbs.mail.relay.b.smtpserver = “smtp-b.local.example.com”
cmsbs.mail.relay.c.smtpserver = “smtp-c.local.example.com”
The performance tuning properties mentioned before can be separately configured for each SMTP server.
cmsbs.mail.relay.a.threads = 5
cmsbs.mail.relay.a.delay = 2000
Address based rules per relay
You can also define which relay to use based on recipient Email address, for example if you want to use an internal mail relay for your local Email addresses.
cmsbs.mail.relay.a.allow.toPattern = “@pinuts.de$”
cmsbs.mail.relay.a.deny.toPattern = “@googlemail.com$”
cmsbs.mail.relay.default.deny.toPattern = “@pinuts.de$”
Type based rules per relay
You can define which relay to use based on the type of Email (newsletter, notification).
cmsbs.relay.a.allow.mailCategories = Newsletter
cmsbs.relay.b.deny.mailCategories = Notification
cmsbs.relay.c.allow.mailCategories = Newsletter Notification
You can define in each event file which relay to use for given event.<event><tag>__allowMailRelay_a</tag></event>
Message rate limits and throttling
Please note that different SMTP servers might have different rate limits or might otherwise throttle mail delivery deliberately.
Microsoft Exchange
Microsoft Exchange has certain default rate limits that might be significant: https://docs.microsoft.com/en-us/exchange/mail-flow/message-rate-limits
The default rate limit might be as low as 5 emails per minute.