We have solved this issue only duplicating the web site.. I tried also with Nop 3.6 but we have same issue: multiple email. No better solution from my side
We have solved this issue only duplicating the web site.. I tried also with Nop 3.6 but we have same issue: multiple email. No better solution from my side
what do you mean by "duplicating the web site" because i'm currently NOT using a multi store setup.
yes, you have not the multistore .. I think that origin of your problem is different. I have not idea why it happens.. in your and my case but I image it is realted to IIS
I modify part of the code as follows: archive: \libraries\nop.services\messages\queuedmessagessendtask.cs public virtual void Execute() { var maxTries = 3; //tvt 20160630 Busca la cuenta default var emailAccount = _emailAccountService.GetEmailAccountById(_emailAccountSettings.DefaultEmailAccountId); if (emailAccount == null) emailAccount = _emailAccountService.GetAllEmailAccounts().FirstOrDefault(); if (emailAccount == null) throw new Exception("No email account could be loaded"); var queuedEmails = _queuedEmailService.SearchEmails(null, null, null, null, true, maxTries, false, 0, 500); foreach (var queuedEmail in queuedEmails) { if (queuedEmail.EmailAccount == emailAccount)//tvt 20160630 valida que de la lista solo se envien los correos que coinciden con el id de email default de la tienda { var bcc = String.IsNullOrWhiteSpace(queuedEmail.Bcc) ? null : queuedEmail.Bcc.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); var cc = String.IsNullOrWhiteSpace(queuedEmail.CC) ? null : queuedEmail.CC.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
Yesterday, I disabled the scheduled task that sends email in nopCommerce, restarted the application, and created a scheduled task using the task scheduler in Windows Server 2012(My web server's operating system). The task opens a browser with the following URL: https://www.MYWEBSITE.com/Admin/ScheduleTask/RunNow/1. It seems to be working great (no more duplicate emails!!!) on my multi-store scenario. Now that my solution/hack is working, I built a plugin to allow anonymous access to the QueuedMessagesSendTask method.
Does anyone see a problem with this solution? I'll post again if something changes.
PS: I'm using a second scheduled task, as a test, to re-queue 9 emails sent to me, every hour. So Far ...NO DUPLICATES!