+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Newsletter sending failed

Newsletter sending failed

10 posts, 0 answered
  1. Saumitra
    Saumitra avatar
    127 posts
    Registered:
    10 Mar 2009
    24 Nov 2009
    Link to this post
    Hi,

    I'm facing a problem with sending newsletters via email to the subscribers. Somehow Sitefinity is not able to send the emails to the subscribers. I've checked the SMTP settings and they are correct as per our webmaster. Incidentally the problem is with only those machine that run Windows XP. We don't face when we port the same application to Windows Server 2003 machine. We are using Sitefinity 3.7 Standard Edition with SP 1.

    I referred to other threads in the forum trying to address a similar problem. But nothing works with me.

    Thanks,
    Saumitra
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    24 Nov 2009
    Link to this post
    Hi Saumitra,

    Could you please check if you have any errors logged in App_data\Sitefinity.log file on the problematic pc? Do you get any error messages on screen or it just hangs?

    Sincerely yours,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Saumitra
    Saumitra avatar
    127 posts
    Registered:
    10 Mar 2009
    25 Nov 2009
    Link to this post
    Hi,

    Thanks for your reply. I checked the sitefinity log as mentioned by you but the log didn't have any errors pertaining to the issue. There were also no error messages on the screen, nor the screen hung. I've attached the screenshots that tell you about different messages I got two different machine. One with Windows XP (Newsletter_Issue.jpg) and the other with Windows Server 2003 (Newsletter_Success.jpg).

    If you notice, the SMTP settings on both the machines are exactly the same.

    Thanks,
    Saumitra
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    26 Nov 2009
    Link to this post
    Hello Saumitra,

    Unfortunately nothing comes to my mind, except if the two pcs are not in one network. Then you might need different settings for the XP machine (assuming it is not in the same network). You can ask the system administrators if there is SMTP relay permissions.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Saumitra
    Saumitra avatar
    127 posts
    Registered:
    10 Mar 2009
    27 Nov 2009
    Link to this post
    Hi Georgi,

    Both the machines are in the same network. And as the SMTP host is our Mail Server, there are no relay permissions to be checked on the local machines as per our web administrator. I forgot to mention earlier that if we make an ordinary ASP.NET page for sending e-mails using System.Net.Mail namespace with the same settings, it works perfectly fine. Hence we think there's some issue the way Sitefinity is configured. I would like to know if there are any other settings we need to check other than the usual SMTP settings available in Sitefinity.

    Thanks,
    Saumitra
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    27 Nov 2009
    Link to this post
    Hi Saumitra,

    I checked the code and where and why this message is thrown. The possible options are:

    - due to permissions related to the smtp setting - SmtpAccess.Connect is false or SmtpAccess.ConnectToUnrestrictedPort is false.

    - one of the following parameters is not correct - SmtpServer, SmtpPort, SmtpUserName, SmtpPassword which are passed to MailingServiceProxy object.

    You can also try your settings with the following code:

    MailingServiceProxy emailServices = new MailingServiceProxy();
    string result = emailServices.VerifySMTPSetting(Host.ToString(), Int32.Parse(Port.ToString()), UserName.ToString(), Password.ToString(), false, "SMTPSettingMail");
    if (string.IsNullOrEmpty(result))
    return true;


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Saumitra
    Saumitra avatar
    127 posts
    Registered:
    10 Mar 2009
    20 Jan 2010
    Link to this post
    Hi Ivan,

    I couldn't get into the details of this issue for quite a long time due to the time constraints. But now i'm back to it. Can you please tell me where do I check for the smtp settings that you mentioned (SmtpAccess.Connect is false or SmtpAccess.ConnectToUnrestrictedPort is false) ?

    Thanks,
    Saumitra
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 Jan 2010
    Link to this post
    Hi Saumitra,

    The problem you have is because the web application does not have permissions to connect to smtp server on the specified portNumber. Have you tried to use the code sample I sent you?  Does the code success true or it fails?
    You can also try to send the email manually using the code below

    DataManager manager = new DataManager();
    INewsletter newsletter = manager.CreateNewsletter();
    newsletter.SenderName = "SENDER HERE";
    newsletter.SenderMail = "SENDER EMIAL";
    string defaultHostEmail = "HOST EMAIL HERE ";
    List<string> toList = new List<string>();
    // USE THE FORMAT AS SHOWN BELOW OTHERWISE THE MESSAGE WILL NOT BE SENT !!!
    string email = "FirstName LastName <your email goes here>";
    toList.Add(email);
    newsletter.Content = "test";
    newsletter.Subject = "test";
    manager.SaveNewsletter(newsletter);
     
     
    ISMTPSetting smtpSetting = manager.GetActiveSMTPSetting();
    Telerik.Notifications.Services.MailingServiceProxy emailServices = new Telerik.Notifications.Services.MailingServiceProxy();
    emailServices.SendEmailsWithDBUpdaingAsync(newsletter.NewsletterId,
                   newsletter.SenderName, newsletter.SenderMail,
                   defaultHostEmail, toList.ToArray(), newsletter.Content,
                   newsletter.Subject, smtpSetting.Host, smtpSetting.Port,
                   smtpSetting.Username,
                   new CryptographyHandler().DecryptText(smtpSetting.Password), smtpSetting.SSL)


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Saumitra
    Saumitra avatar
    127 posts
    Registered:
    10 Mar 2009
    20 Jan 2010
    Link to this post
    Hi Ivan,

    I tried the code provided by you earlier to verify the smtpsettings. But I'm facing a run-time error while executing the code. I've attached the screenshot of that error. Please suggest how do I take it ahead.

    Thanks,
    Saumitra
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 Jan 2010
    Link to this post
    Hi Saumitra,

    Something at your end does not allow you to call MailingServiceProxy and create a new object. Check whether you have a dll generated under Sitefinity/ServiceAssemblies and you have MailingWebService.asmx added to Sitefinity/Admin/Services folder. Make sure that the webservice is not blocked at your end.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
10 posts, 0 answered