sorry for the confusion. (let's assume I am not using RequestQuote2 at all in my project and I don't have those 2 .cs files in Business logic location)
If I just want a request quote page to send e-mail to other recipients other than store owner -
so mb according to you If instead of this:
string ccEmails = SettingManager.GetSettingValue("RecipientThird.ccEmails", String.Empty);
string bccEmails = SettingManager.GetSettingValue("RecipientSecond.bccEmails", String.Empty);
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);
}
this.MessageService.InsertQueuedEmail(5, from, to, ccEmails, bccEmails, subject, body2,
DateTime.UtcNow, 0, null, emailAccount.EmailAccountId);
If I use this:
string ccEmails = SettingManager.GetSettingValue("RecipientThird.ccEmails", String.Empty);
string bccEmails = SettingManager.GetSettingValue("RecipientSecond.bccEmails", String.Empty);
this.MessageService.InsertQueuedEmail(5, from, to, ccEmails, bccEmails, subject, body2,
DateTime.UtcNow, 0, null, emailAccount.EmailAccountId);
Still I should be able to send e-mail and save multiple e-mail addresses in bcc and cc seperated by ";" ?
Because I think the code that I have removed above "List<string> bcc = new List<string>" is sending e-mail to all the email addresses which are seperated by ";" sign and if I remove this code then how code will know that if ";" comes then there is new email address after that I mean the code will use semi colon sign as part of the email address like this
[email protected]; which again will give an error saying un-available mailbox ?
plz correct me if I am wrong.
-------------------------------------MORE-----------------------------------mb wrote:The code I mentioned to remove is not being used by the code you posted, your CC and BCC email addresses are loaded from settings and are stored in variables ccEmails and bccEmails which are then passed to InsertQueuedEmail.
string ccEmails = SettingManager.GetSettingValue("RecipientThird.ccEmails", String.Empty);
string bccEmails = SettingManager.GetSettingValue("RecipientSecond.bccEmails", String.Empty);
// code removed
this.MessageService.InsertQueuedEmail(5, from, to, ccEmails, bccEmails, subject, body2,
DateTime.UtcNow, 0, null, emailAccount.EmailAccountId);
Isn't the variables "ccEmails" and "bccEmails" being used here:
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);
}
-------------------------------------MORE-----------------------------------to make use of that removed code if instead of using:
this.MessageService.InsertQueuedEmail(5, from, to,
ccEmails,
bccEmails, subject, body2,
DateTime.UtcNow, 0, null, emailAccount.EmailAccountId);
I use this:
this.MessageService.InsertQueuedEmail(5, from, to,
cc,
bcc, subject, body2,
DateTime.UtcNow, 0, null, emailAccount.EmailAccountId);
It gives me error by underlying the line of code