Hello everyone,
I'm really stuck right now and I hope someone here can help me. Our site sends many emails at one time for notificaitons. When we send the emails, not all emails are sent. For example we need to send 200 emails out. We call the DotNetNuke.Services.Mail client to do this. The issue is that after a certain number (Which seems random) the system stops sending. We are using Google and they said the issue may be that we should use just one email client to send the emails.
It seem that DNN creates a new client every time an email is sent
using (var smtpClient = CreateSmtpClient(smtpInfo, host, port)) {
foreach(var mailMessage in messages){ smtpClient.Send(mailMessage);
} }
Is there a method to use where a single SMTP client is created, THEN the emails are sent?
After a number of emails are sent (In this example 91 were successfully sent) then the following error is registered for each of the next 99 emails:
AbsoluteURL:/desktopmodules/CVRegistration/Service.asmx/BulkEmail
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:2890f113-c87d-4a59-91c3-3c81eb684ad1
AssemblyVersion:
PortalId:-1
UserId:-1
TabId:-1
RawUrl:
Referrer:
UserAgent:
ExceptionHash:UPlHF73t/GGpNtFq7LermfBUt9Y=
Message:Unable to read data from the transport connection: net_io_connectionclosed.
StackTrace:
at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.CheckCommand.Send(SmtpConnection conn, String& response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message)
InnerMessage:
InnerStackTrace:
Source:System
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:
Server Name: WEB_SERVER_1
As always Sebastian,
Thanks for being such a huge support. I will look into their method.
Joe
OK,
Just thought I would update this topic for anyone who has a similar question or issue.
We are using G-suite from Google. We moved to Google from GoDaddy because we were limited to the number of relays per day. Our company is growing, and it was too expensive to add relays from GoDaddy.
Originally we were sending one email per session, but Google limited the number of sessions, and would block any additional sessions.
We started using the bulk email with tokens code within DNN (We are using 9.8.1) and still had a similar issue. It turns out Google sets a limit of 100 SMTP email address sends per session. We have a TO and a CC, so that was counting as 2 sends. The session would close as soon as we got close to the 100 (It was never an exact number).
We are looking into a provider where we can send our emails via the DNN SMTP client. (In addition to the normal DNN email, the administrators of each portal send a weekly news letter, emails blasts to either the whole directory or a portion.
Just to throw it out there, What are people using to send out emails to their customers? Has anyone else had to use an SMTP email provider because their site is sending too many emails?
Just for full discolsure: THIS IS NOT SPAM EMAIL. These are customers who expect to recieve these emails.
Thanks!!
I use the SMTP service from sendpulse and find it reliable and cheap
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.