|
|
|
|
Joined: 5/4/2006
Posts: 45
|
|
|
Hi
I recently upgraded my site from DNN3.3.7 to 4.9.1. Pretty much everything is working ok except that I am finding a module, that I created in DNN 3.3.7 is not sending emails the way it was, and I am wondering if there is a bug in the SendMail code.
I have some code
DotNetNuke.Services.Mail.Mail.SendMail(_sendfrom, "admin@mydomain.com","you@mydomain.com,me@mydomain.com",EmailSubject.Text, Server.HtmlDecode(EmailText.Text), "", "html", "", "", "", "")
When I invoke the send it sends the email but only admin@mydomain.com and me@mydomain.com receives it. When I looked at the code I found that with CC and BCC the code is objMail.Bcc.Add(Bcc) where Bcc contains "you@mydomain.com,me@mydomain.com"
Is this right or should the objMail.Bcc.Add(Bcc) loop through everything seperated by commas?
Thanks in advance
|
|
|
|
| |
|
|
|
AFAIR there is specific code to replace comma by semicolon, but try to use semicolon instead. You also don't need to HTMLDecode, except the text is encoded.
|
|
|
|
| |
|
|
Joined: 7/3/2007
Posts: 5
|
|
|
hi,
perhaps you can try this
DotNetNuke.Services.Mail.Mail.SendMail(_sendfrom, "admin@mydomain.comyou@mydomain.com;me@mydomain.com",EmailSubject.Text"", "html", "", "", "", ""), Server.HtmlDecode(EmailText.Text), ;
is recommend to create a functions to replace those emails you want to send to, unless you just want to send to specific users.
Roy Thakur wrote
Hi
I recently upgraded my site from DNN3.3.7 to 4.9.1. Pretty much everything is working ok except that I am finding a module, that I created in DNN 3.3.7 is not sending emails the way it was, and I am wondering if there is a bug in the SendMail code.
I have some code
DotNetNuke.Services.Mail.Mail.SendMail(_sendfrom, "admin@mydomain.com","you@mydomain.com,me@mydomain.com",EmailSubject.Text, Server.HtmlDecode(EmailText.Text), "", "html", "", "", "", "")
When I invoke the send it sends the email but only admin@mydomain.com and me@mydomain.com receives it. When I looked at the code I found that with CC and BCC the code is objMail.Bcc.Add(Bcc) where Bcc contains "you@mydomain.com,me@mydomain.com"
Is this right or should the objMail.Bcc.Add(Bcc) loop through everything seperated by commas?
Thanks in advance
|
|
|
|
| |
|
|
|
I don't understand, what woaychee is trying to do, maybe you should install the debug symbols for your DNN version from http://www.codeplex.com/DNNHelpSystem and trace, what happens within your call. sorry, no other idea atm.
|
|
|
|
| |
|
|
|
Joined: 5/4/2006
Posts: 45
|
|
|
Hi
Thanks for your reply. The reason I am doing it the way that I am is that I need to send emails blind copied so that other people do not see who the email is going to.
woaychee wrote
hi,
perhaps you can try this
DotNetNuke.Services.Mail.Mail.SendMail(_sendfrom, ";admin@mydomain.comyou@mydomain.com;me@mydomain.com",EmailSubject.Text"", "html", "", "", "", ""), Server.HtmlDecode(EmailText.Text),
is recommend to create a functions to replace those emails you want to send to, unless you just want to send to specific users.
Roy Thakur wrote
Hi
I recently upgraded my site from DNN3.3.7 to 4.9.1. Pretty much everything is working ok except that I am finding a module, that I created in DNN 3.3.7 is not sending emails the way it was, and I am wondering if there is a bug in the SendMail code.
I have some code
DotNetNuke.Services.Mail.Mail.SendMail(_sendfrom, "admin@mydomain.com","you@mydomain.com,me@mydomain.com",EmailSubject.Text, Server.HtmlDecode(EmailText.Text), "", "html", "", "", "", "")
When I invoke the send it sends the email but only admin@mydomain.com and me@mydomain.com receives it. When I looked at the code I found that with CC and BCC the code is objMail.Bcc.Add(Bcc) where Bcc contains "you@mydomain.com,me@mydomain.com"
Is this right or should the objMail.Bcc.Add(Bcc) loop through everything seperated by commas?
Thanks in advance
|
|
|
|
|
| |