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

Forums / Developing with Sitefinity / smtp in newsletter module

smtp in newsletter module

10 posts, 0 answered
  1. Mart
    Mart avatar
    66 posts
    Registered:
    10 Aug 2006
    10 Mar 2010
    Link to this post
    Hello,

    I try to connect to my smtp server.
    As we have a separate mail sever we need to enter:

    smtp server        : smtp.[sitename.com]
    smtp port            : **
    smtp username   :mail.[sitename.com]\username    (not email)
    smtp password    :****

    In the newsletter this does not work.
    As i read it is because of the username not in e-mail format?

    How to make this work.
    It seems to me that just creating an username with @ is not working because we have a separate mailserver which needs mail.[sitename.com]\ before the username

    Hope you can help me

    Martijn 


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Mar 2010
    Link to this post
    Hello Mart,

    If you do not use username is this format "somename@somethingelse.whatever" the newsletters module will invalidate your SMTP settings and you will not be able to activate them. There is a solution to this problem, but it is a hack and there is no guarantee that something else will not break.
    What you can do

    • Open [sf_Notif_SMTPSetting]
    • The select query will return a row/s with your SMTP settings
    • Set Status and Active values to 1. This will activate your settings automatically and the username will not be verified anymore.


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Mart
    Mart avatar
    66 posts
    Registered:
    10 Aug 2006
    10 Mar 2010
    Link to this post
    Hello Ivan,

    First, thank you for your respond.
    But it realy is a hack. When sending a test newsletter now sometimes the newsletter is sent and somtimes it says sending is failed. I do not know why.
    Any suggestions?

    Mart
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Mar 2010
    Link to this post
    Hello Mart,

    This is the only way to set up the newsletter if your name is not in email format. When the newsletters fails you could check App_Data/sitefinity.log  to see whether there are any errors thrown, because "somtimes it says sending is failed." is not enough to say what could be the problem.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Mart
    Mart avatar
    66 posts
    Registered:
    10 Aug 2006
    10 Mar 2010
    Link to this post
    Hello Ivan,

    I lookked for App_Data/sitefinity.log but there is no such file there.
    I have discovered that the failure:
     "Sending is failed, you can try again after fixing this error. (How to set mail server?)"

    only occurs when sending to an e-mail adress which is on my mail domain.
    so not when i sent to a person outside the organisation.

    Hope you can help me out

    Mart
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Mar 2010
    Link to this post
    Hello Mart,

    It looks like you have some SMTP restriction or the username and password for your SMTP host are invalidated when you send an email to these two instances. The error is thrown from StartSending ( ) method.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Mart
    Mart avatar
    66 posts
    Registered:
    10 Aug 2006
    11 Mar 2010
    Link to this post
    Hello Ivan,

    where can i find this code?
    It's not in sitefinity\admin folder

    Mart

  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    11 Mar 2010
    Link to this post
    Hi Mart,

    Can you, please check the following configuration section in your web.config:
    <system.net>
        <mailSettings>
            <smtp from="xxxx@xxx.xx">
                <network host="xxxx" userName="xxx" password="xxx" port="25" />
            </smtp>
        </mailSettings>
    </system.net>

    then you can create a simple user control and try this code:
    MailMessage newMesssage = new MailMessage();
    //modify this to fit your requirements
    newMesssage.From = new MailAddress("admin@mymail.com");
      
    newMesssage.To.Add("Add recepient email");
    string message = String.Format("Message body");
    //send email messsage
    SmtpClient smtpClient = new SmtpClient();
    smtpClient.Send(newMesssage);


    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Mart
    Mart avatar
    66 posts
    Registered:
    10 Aug 2006
    11 Mar 2010
    Link to this post
    hello Radoslav,

    this works. but the problem with the newsletter still exist
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Mar 2010
    Link to this post
    Hello Mart,

    We are not making filtering to the outgoing or incoming emails. It seems that your settings are invalidated somehow. Sitefinity only accepts username, password, host and port. Then, in its basis the module uses SMTP client. Also you have hacked the SMTP setting, so I am not sure whether the problem comes from this. By default your settings were not validated ( take a look at the first post).

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
10 posts, 0 answered