Multiple emails on new registration

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

I am on final testing stage of my webstore and it is going to be launched next month. I am facing this annoying issue.

When I try to register a new account, I receive three emails with activation link and three emails for welcome message (after activation). My admin email-id receives two emails about the new registration notification.

Can anyone suggest solution?

Customer inbox snapshot

Admin inbox snapshot
11 years ago
I hope this is of any help:
https://www.nopcommerce.com/boards/t/7430/sending-multiple-email-messages.aspx
https://www.nopcommerce.com/boards/t/2899/emails-sending-twice.aspx
11 years ago
Hi Eduardo,

That didn't help. I tried changing my email id from gmail to hotmail server. Still the same.

Customer receives three emails with activation links, three emails with welcome message after activation and the admin email id receives two emails for notifying new customer registration.

This is really frustrating.
11 years ago
check the code in Libraries/Nop.Services/Messages/WorkflowMessageService.cs file. may be mistakenly you copy and paste the lines that add same mail to the email que more time. check in utilities block SendNotification method.

may be the follwing line copied more than once in your method.

_queuedEmailService.InsertQueuedEmail(email);

put the break point and check how many time its sending.


also check QuedMessagesSendTask.cs file in Execute method change the

var maxTries = 3; to 1;

check is there any exception in the try catch block.
11 years ago
elaa1979 wrote:
check the code in Libraries/Nop.Services/Messages/WorkflowMessageService.cs file. may be mistakenly you copy and paste the lines that add same mail to the email que more time. check in utilities block SendNotification method.

may be the follwing line copied more than once in your method.

_queuedEmailService.InsertQueuedEmail(email);

put the break point and check how many time its sending.


also check QuedMessagesSendTask.cs file in Execute method change the

var maxTries = 3; to 1;

check is there any exception in the try catch block.


Hi,

I am not a developer/programmer.

I use "no source" release and hence there is no way I can change the source code :).
11 years ago
Even though the admin message queue says the message was sent 1 times, it is delivered 3 times to customers.

Image 1

Image 2
10 years ago
If you have multiple web sites on the same AppPool and receive the same email multiple times than you should make the following change in Global.asax file:          
 
if (databaseInstalled && (Application["TaskManagerStarted"] == null))
            {
                Application["TaskManagerStarted"] = 1;
                TaskManager.Instance.Initialize();
                TaskManager.Instance.Start();
            }

You should also check and be sure that there are no multiple AppPools running on the same NopCommerce DB instance.
10 years ago
Why does it matter if you have multiple App Pools running on the same database instance?  I would think it would be better to run each store in a multi-store in a separate app pool.  Anyone have different thoughts?

We saw this issue.  A different post someone said they made new app pools and the problem went away.  We recently had the multiple email issue occur to us. I also needed to create new app pools and reassign to fix the issue.  But, it returned within a day.

Still no resolution.  So, trying the global.asax code from this post.  It works right now.  Need to give it some time to know for sure, though.

Update: adding the above code to the global.asax doesn't solve our issue.  Also 5 stores are now running in the same App Pool and issue persists.
10 years ago
So, we added a line of code to log information when sending email in the Execute method of the Nop.Services.Messages.QueuedMessagesSendTask class.

Added _logger.Information("message sent " + queuedEmail.Subject + " " + queuedEmail.To); right after the SendMail call.

The information is being logged multiple times, so something is calling this method twice.

When inspecting the message in the Message Queue it says it only attempted to send the message once, but something is awry.
10 years ago
Added more information to the logging.  Most importantly the Thread ID.  When multiple emails are going out they all have different thread ids.

This certainly looks like a multi-store bug.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.