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

SMTP Setting

12 posts, 0 answered
  1. lam huynh
    lam huynh avatar
    8 posts
    Registered:
    08 Sep 2009
    17 Jul 2010
    Link to this post
    I try to use Sitefinity with Gmail, but I got error when i make an active setting.
    When I fill all informarion, click "test and save current setting" and I got this error.
    What issue? How can I solve it?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    18 Jul 2010
    Link to this post
    Hi lam huynh,

    There are could be two reasons for the error - 401 Access Denied you are getting

    1. GMAIL has denied your request.

    2. InvokeWebMethodCall uses reflection. If you are working in medium trust you cannot set SMTP settings.

    Greetings,
    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. Ian
    Ian avatar
    6 posts
    Registered:
    07 Sep 2010
    08 Sep 2010
    Link to this post
    I am also having an issue when attempting to set the SMTP setting in the same way. The error I get is...

    The request failed with HTTP status 401: Unauthorized.

    I don't think I'm on medium trust because I added the following to my web.config in <system.web> ....

    <securityPolicy>
      <trustLevel name="Full" policyFile="internal"/>
    </securityPolicy>

    Is this some sort of authentication problem? Thanks!
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    08 Sep 2010
    Link to this post
    Hello Ian,

    If your website is hosted you have to check whether your hosting service provider is specifically setting your trust level to medium. Then setting the web.config will not help. An example is shared hosting - some shared hosting providers set the trust level to medium by default.

    Regards,
    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
  5. Ian
    Ian avatar
    6 posts
    Registered:
    07 Sep 2010
    08 Sep 2010
    Link to this post
    Thanks for your quick response! I am hosting this application off of a box that I set up so if such a setting is in effect, I should be able to change it. Do you know how I would do this?
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    08 Sep 2010
    Link to this post
    Hello Ian,

    You can check your website in IIS, there is a trust level setting in the IIS manager. Also can you check if it is the first case Ivan has suggested.

    Sincerely yours,
    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
  7. Ian
    Ian avatar
    6 posts
    Registered:
    07 Sep 2010
    08 Sep 2010
    Link to this post
    Thanks again for the quick response. I've checked the trust level setting in the IIS manager and it is set to Full. The SMTP server I'm using works fine and has not logged anything dealing with my attempts to run this test.

    Where is this HTTP 401 error coming from? A web service on my SF box? Do I need to set a permission somewhere?

    Thanks
  8. Ian
    Ian avatar
    6 posts
    Registered:
    07 Sep 2010
    08 Sep 2010
    Link to this post
    Also, I get the same error when attempting the test using my Gmail credentials (like lam huynh above). Is it possible that the web service responsible for talking to SMTP servers does not like my user account that is running SF..?
  9. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Sep 2010
    Link to this post
    Hello Ian,

    The SMPT server only receives the user credentials provided by the call to it. It should not have to know anything about the user under which you are running the website. What port are you trying to connect to on the SMTP server. I am using smtp.gmail.com, port 25 and enable SSL (Gmail authentications goes through a secure connection). It successfully connects to the Gmail SMTP. Can you please try to open your website in Visual Studio and run it through the Visual Studio's integrated WebDevelopment Server and try to connect to the Gmail or your SMTP server. Also check if you have a firewall or something that might be blocking outgoing connections.

    Sincerely yours,
    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
  10. Ian
    Ian avatar
    6 posts
    Registered:
    07 Sep 2010
    09 Sep 2010
    Link to this post
    Hello,

    I tested out my SMTP settings on my development machine and they work. I added a firewall rule on my production server and the problems remains the same. Here's the exception detail in the Windows event log:

    Event code: 3005 
    Event message: An unhandled exception has occurred. 
    Event time: 9/9/2010 10:13:39 AM 
    Event time (UTC): 9/9/2010 3:13:39 PM 
    Event ID: 91641fa3770d47b9abe409137ebc7dac 
    Event sequence: 11 
    Event occurrence: 1 
    Event detail code: 0 
     
    Application information: 
        Application domain: /LM/W3SVC/1/ROOT/PTW-1-129285181836335345 
        Trust level: Full 
        Application Virtual Path: /PTW 
        Application Path: C:\inetpub\wwwroot\PTW\ 
        Machine name: PANDORA 
     
    Process information: 
        Process ID: 2792 
        Process name: w3wp.exe 
        Account name: NT AUTHORITY\NETWORK SERVICE 
     
    Exception information: 
        Exception type: WebException 
        Exception message: The request failed with HTTP status 401: Unauthorized. 
     
    Request information: 
        Request URL: http://localhost/PTW/sitefinity/admin/Modules.aspx?module=Newsletters 
        Request path: /PTW/sitefinity/admin/Modules.aspx 
        User host address: ::1 
        User: admin 
        Is authenticated: True 
        Authentication Type: Forms 
        Thread account name: NT AUTHORITY\NETWORK SERVICE 
     
    Thread information: 
        Thread ID: 6 
        Thread account name: NT AUTHORITY\NETWORK SERVICE 
        Is impersonating: False 
        Stack trace:    at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy.InvokeWebMethodCall(Boolean async)
       at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy.InvokeWebMethodCall()
       at Telerik.Notifications.Services.MailingServiceProxy.VerifySMTPSetting(String smtpHost, Int32 smtpPort, String smtpUsername, String smtpPassword, Boolean smtpSsL, String msgBody)
       at Telerik.Notifications.Newsletters.WebControl.SMTPSettingControl.TestCurrentSettings()
       at Telerik.Notifications.Newsletters.WebControl.SMTPSettingControl.SaveCurrentSetting()
       at Telerik.Notifications.Newsletters.WebControl.SMTPSettingControl.button_Command(Object sender, CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Sep 2010
    Link to this post
    Hello Ian,

    Newsletters module uses asynchronously calling the Web service. It looks like your firewall or something else blocks this call. You could add an exception, so that the service will start to work properly. InvokeWebMethodCall uses Method info of System.Reflection to get a proxy instance - SoapHttpClientProtocol and then invoke the proxy instance - as object array of parameters

    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
  12. Ian
    Ian avatar
    6 posts
    Registered:
    07 Sep 2010
    09 Sep 2010
    Link to this post
    Thanks for the continuing help,

    I've already created a rule allowing outbound connections on port 25 which is the only one I require and the problem remains. What else could possibly be blocking this?
Register for webinar
12 posts, 0 answered