Message Queue not sending mail

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi,

If the scheduled task to send mail is active, queued mails are not sending.

My system log fills with the following error:
The remote server returned an error: (401) Unauthorized.

System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
   at System.Net.WebClient.UploadValues(String address, NameValueCollection data)
   at Nop.Services.Tasks.TaskThread.Run()

If i manually choose to run the send mail task the messages send without issue. It is only the scheduled messages that fail.

I tried changing the SMTP server to one which sends non authenticated, non TLS, no rate limit and I still get the same problem.

Thanks in advance for any advice
5 years ago
See if this helps

https://www.nopcommerce.com/boards/t/48514/error-while-running-the-keep-alive-schedule-task-in-v38.aspx

(i.e. check the store URL settings)
5 years ago
Hi,
I had a similar issue, emails were not sent by the scheduled task, but I could send them running the task manually, I suppose none of the scheduled tasks could run, though the stuck emails were the most apparent symptom.  However my error message was different from yours.

I still don't know the cause of the problem, it was maybe related to some errors in customer roles when I upgraded the database from 1.9 to 2.something than to 3.4 and now to 4.0.  That's why not many of nop users have this I suppose.

I solved it by making the Customer "[email protected]"  as Registered + Administrator role.

This post helped me: https://www.nopcommerce.com/boards/t/50596/nop-4-scheduletasks-not-running-automatically.aspx?p=2
5 years ago
Thanks you are right it was all scheduled tasks, I had turned the rest off while testing the mail sending.

I have found my issue, one of those head slapping "doh" moments.

I had website authentication password active while in test. I totally forgot because my browser remembers it and I never see the request now.

Thanks for taking the time to help
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.