|
|
|
|
|
www.cathal.co.uk Joined: 4/9/2003
Posts: 9676
|
|
|
that confirms that this is a different bug as the bug that was fixed was also an issue in 7.1.2. Taking a look at the code, the main difference introduced between 7.1.2 and 7.2.0 with the sendmail method was that the method was updated to do additional validation - in 7.1.2 only the first (bolded) check occurs, from 7.2.0 all 4 checks occur. This would suggest some issue with one of the 3 fields. Beforehand we always used the 4 host settings, but now we allow users to pass in different values so perhaps the issue is that your code calls a method passing one of those values (i.e a new smtpserver/smtpauthentication/smtpusername/smtppassword) -and the code (incorrectly) ignored those values in 7.1.2, but now (correctly) tries to use them in 7.2.0/7.2.1 - and one of them is causing an issue. It would be good to get the full stack trace from the admin->event viewer to see if it contains any useful data.
//SMTP server configuration
if (string.IsNullOrEmpty(smtpServer) && !string.IsNullOrEmpty(Host.SMTPServer))
{
smtpServer = Host.SMTPServer;
}
if (string.IsNullOrEmpty(smtpAuthentication) && !string.IsNullOrEmpty(Host.SMTPAuthentication))
{
smtpAuthentication = Host.SMTPAuthentication;
}
if (string.IsNullOrEmpty(smtpUsername) && !string.IsNullOrEmpty(Host.SMTPUsername))
{
smtpUsername = Host.SMTPUsername;
}
if (string.IsNullOrEmpty(smtpPassword) && !string.IsNullOrEmpty(Host.SMTPPassword))
{
smtpPassword = Host.SMTPPassword;
}
Buy the new Professional DNN7: Open Source .NET CMS Platform book
Amazon US
|
|
|
|
| |
|
|
|
Joined: 1/28/2013
Posts: 4
|
|
|
Hello,
We have been using the following SendMail overload for about the last 7 years without any issues, however with the release of DNN 7.2.0 our customers are no longer able to send emails from their online stores:
emailResult = DotNetNuke.Services.Mail.Mail.SendMail(bi.SendFromEmail, customer.Email, "", emailSmithUserSubject, emailSmithUserBody, "", "html", smtpServer, smtpAuth, smtpUserName, smtpPassword);
Is this particular SendMail overload call not supported anymore? If not, please reply with the correct SendMail call that we should be using.
Thank you.
Kevin Carlson
Project Manager
Smith Consulting
|
|
|
|
| |
|
|
|
Joined: 1/28/2013
Posts: 4
|
|
|
Hello,
We have been using the following SendMail overload for about 7 years now without any issues however with the release of DNN 7.2.0 our customers are no longer able to send emails from their online stores.
emailResult = DotNetNuke.Services.Mail.Mail.SendMail(bi.SendFromEmail, customer.Email, "", emailSmithUserSubject, emailSmithUserBody, "", "html", smtpServer, smtpAuth, smtpUserName, smtpPassword);
Is this particular SendMail call not supported anymore? If not, please reply with the correct SendMail call that we should be using.
Thank you
Kevin Carlson
Project Manager
Smith Consulting
|
|
|
|
| |
|
|
|
Joined: 1/28/2013
Posts: 4
|
|
|
cathal connolly wrote:
that confirms that this is a different bug as the bug that was fixed was also an issue in 7.1.2. Taking a look at the code, the main difference introduced between 7.1.2 and 7.2.0 with the sendmail method was that the method was updated to do additional validation - in 7.1.2 only the first (bolded) check occurs, from 7.2.0 all 4 checks occur. This would suggest some issue with one of the 3 fields. Beforehand we always used the 4 host settings, but now we allow users to pass in different values so perhaps the issue is that your code calls a method passing one of those values (i.e a new smtpserver/smtpauthentication/smtpusername/smtppassword) -and the code (incorrectly) ignored those values in 7.1.2, but now (correctly) tries to use them in 7.2.0/7.2.1 - and one of them is causing an issue. It would be good to get the full stack trace from the admin->event viewer to see if it contains any useful data.
//SMTP server configuration
if (string.IsNullOrEmpty(smtpServer) && !string.IsNullOrEmpty(Host.SMTPServer))
{
smtpServer = Host.SMTPServer;
}
if (string.IsNullOrEmpty(smtpAuthentication) && !string.IsNullOrEmpty(Host.SMTPAuthentication))
{
smtpAuthentication = Host.SMTPAuthentication;
}
if (string.IsNullOrEmpty(smtpUsername) && !string.IsNullOrEmpty(Host.SMTPUsername))
{
smtpUsername = Host.SMTPUsername;
}
if (string.IsNullOrEmpty(smtpPassword) && !string.IsNullOrEmpty(Host.SMTPPassword))
{
smtpPassword = Host.SMTPPassword;
}
Hello,
We have been using the following SendMail overload for about 7 years now without any issues however with the release of DNN 7.2.0 our customers are no longer able to send emails from their online stores.
emailResult = DotNetNuke.Services.Mail.Mail.SendMail(bi.SendFromEmail, customer.Email, "", emailSmithUserSubject, emailSmithUserBody, "", "html", smtpServer, smtpAuth, smtpUserName, smtpPassword);
Is this particular SendMail call not supported anymore? If not, please reply with the correct SendMail call that we should be using.
Thank you
Kevin Carlson
Project Manager
Smith Consulting
|
|
|
|
| |
|
|
|
|
www.cathal.co.uk Joined: 4/9/2003
Posts: 9676
|
|
|
all of the existing signatures are still supported (we dont change signatures, only obsolete calls and forward their requests onto new signatures). Based on this and the other report clearly some other change has affected you - I posted code earlier where we added additional validation to 3 values, and I think this is it i.e. your code calls:
emailResult = DotNetNuke.Services.Mail.Mail.SendMail(bi.SendFromEmail, customer.Email, "", emailSmithUserSubject, emailSmithUserBody, "", "html", smtpServer, smtpAuth, smtpUserName, smtpPassword);
perhaps smtpServer, smtpAuth, smtpUserName or smtpPassword contains "bad" values. Before 7.2.0 these were ignored as sendmail always used the Host values - we noticed this was wrong and now use the values passed in the call (if they're not empty) i.e. if your smtpUsername was actually "somefakenamethatdoesntexist" older versions such as 7.1.2 would have used the Host.SMTPUsername but 7.2.0 and above ""somefakenamethatdoesntexist" (which is correct application behaviour i.e. the issue is in the calling code not DNN)
Buy the new Professional DNN7: Open Source .NET CMS Platform book
Amazon US
|
|
|
|
| |