hello mb,
In 1.9v website I created a 3rd request quote form in which is similar to the first request quote form, updated for 1.90
The only difference is that instead of sending it to store owner - I am sending it to 3 different recipients.
I have created settings for cc bcc - saved the correct e-mail address from administration area (in database) still the second person who is based on bcc never gets any e-mail, why ? If I put number of email address in one (bcc or cc) then store owner gets the email which means something is not working fine in the code.
This is my what I have:
The first request quote form, updated for 1.90: (Quote.ascx.cs)
[...]
In 1.9v website I created a 3rd request quote form in which is similar to the first request quote form, updated for 1.90
The only difference is that instead of sending it to store owner - I am sending it to 3 different recipients.
I have created settings for cc bcc - saved the correct e-mail address from administration area (in database) still the second person who is based on bcc never gets any e-mail, why ? If I put number of email address in one (bcc or cc) then store owner gets the email which means something is not working fine in the code.
This is my what I have:
The first request quote form, updated for 1.90: (Quote.ascx.cs)
[...]
The code you posted looks like a mix of RequestQuote and RequestQuote2; you can remove the following from the code you posted as it's not being used (it is used by MessageService.SendEmail in RequestQuote2):
List<string> bcc = new List<string>();
foreach (string str1 in bccEmails.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
bcc.Add(str1);
}
List<string> cc = new List<string>();
foreach (string str1 in ccEmails.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
cc.Add(str1);
}
I tested the code you posted (with your settings names -different emails) and found no problems with it. I debugged the SendQueuedMessagesTask and it is working as it should -all email address are set for the message as they should be. I did notice that if an email message is specified twice in all the addresses (e.g. in TO and in BCC), the recipient only receives one instead of two. I don't believe that is an error though -most likely a spam prevention function of the mail server (why send the same email twice to the same recipient in a message -also verified the same behavior through the mail server's web mail interface).
You could check the message queue to verify the cc and bcc addresses have been added to the queued message (uncheck the setting "Load not sent emails only:" before loading the messages to see previously sent messages). You could also debug the SendEmail method (line 2424) in Libraries\Nop.BusinessLogic\Messages\MessageService.cs to watch the message being sent by SendQueuedMessagesTask.
.