Newsletter > SMTP settings > Send test message Return

Posted by Community Admin on 04-Aug-2018 07:42

Newsletter > SMTP settings > Send test message Return code: 404

All Replies

Posted by Community Admin on 08-Jul-2011 00:00

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.

Posted by Community Admin on 08-Jul-2011 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 28-Sep-2011 00:00

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.

Posted by Community Admin on 28-Sep-2011 00:00

Nothing in \App_Data\Sitefinity\Logs is of any help - no errors are being logged when Sitefinity cannot connect.  

Posted by Community Admin on 29-Sep-2011 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Sep-2011 00:00

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.


This thread is closed