Newsletter > SMTP settings > Send test message Return code: 404
Hi,
I'm getting "Return code: 404" error on the Newsletter SMTP settings > Test SMTP settings "Send test message" button feature.
I've checked the following posts and searched for the solution before posting this.
www.sitefinity.com/.../smtp-save-fails-with-404.aspx
www.sitefinity.com/.../404-error-when-updating-newsletter-settings.aspx
I've also tried to change the "host headers" to "Default" as mentioned in the above posts by following these steps: technet.microsoft.com/.../cc753195(WS.10).aspx
but it throws 404 file not found error and my whole site went down after. Please see attached files.
I'm on IIS7, WinServer 08 R2 Standard. Sitefinity Version : 4.1.1405.0
Is there anything else I need to do in order to test the smtp setting please?
Thanks.
Hello May,
Please enable service tracer log and see the actual exception
msdn.microsoft.com/.../ms732023.aspx
All the best,
Ivan Dimitrov
the Telerik team
Ivan - can you give more detail as to how to enable some logging or tracing for Sitefinity? I am absolutely stumped with the SMTP settings. I have provided Sitefinity with the details for two valid SMTP relays (one internal, one external) and no matter what the test returns 404 each time.
Nothing in \App_Data\Sitefinity\Logs is of any help - no errors are being logged when Sitefinity cannot connect.
Hi Hrc,
Ok, can you create a simple user control with the code below( replace some of the variables depending on your settings) and let me know if you can receive an email
var smtpClient = new SmtpClient();
smtpClient.Host = "your host here";
smtpClient.Port = 25;
smtpClient.Credentials = new NetworkCredential("SmtpUsername", "SmtpPassword");
var testMessage = new MailMessage();
testMessage.To.Add(new MailAddress("TestEmailAddress"));
testMessage.Subject = "test your email";
testMessage.From = new MailAddress("type email from");
testMessage.Body = "this is a test email";
testMessage.IsBodyHtml = false;
smtpClient.Send(testMessage);
Best wishes,
Ivan Dimitrov
the Telerik team
Figured this out.
Using Chrome network debugging I looked at what this Email Campaigns SMTP Settings screen was trying to do while sending the test email out. Turns out it was looking for:
/Sitefinity/Services/Newsletters/Settings.svc/smtptest/
A quick check of that folder revealed that Settings.svc wasn't there. So in trying to figure out how this happened in the first place - does the Sitefinity Project setup *include* all these services in the project file (*.proj)? I ask this because we certainly didn't *exclude* these files. If the files aren't included in the project, then you won't get them published.
I have seen others reporting this 404 error and now it makes sense - 404 means the file is not there - which it wasn't.
Hope this helps someone else, because I've wasted countless hours.