Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • sritchie 48 posts 80 karma points
    Oct 01, 2009 @ 16:08
    sritchie
    0

    Enabling SSL for Doc2form

    Hi guys,

    Having a few issues in getting the doc2form (or any mailer) working with a gmail account. My client uses Google Apps, hence the custom domain also requires SSL (as per gmail settings) .

    i.e. the error message is:

     

    "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. l12sm184614fgb.20"

     

    In the web.config there doesn't appear to be anyway to turn on ssl in mailsettings in order to enable the email to send via a Google Apps account.

    Would apreciate any feedback/comments.

    Thanks.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Oct 01, 2009 @ 17:02
    Sebastiaan Janssen
    1

    Have a look at the configuration I've detailed in another post.

    However, turning on the SSL absolutely needs to be done from the code. If that option is not available in doc2form then I guess you're out of luck (unless it's open source? not sure, haven't used it).

    In the contact form I use this to switch on SSL:

                SmtpClient client = new SmtpClient();
    client.EnableSsl = true;
    client.Send(mail);
  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 01, 2009 @ 17:29
    Douglas Robar
    0

    You can set this just as Sebastiaan says... in the doc2form.ascx.cs file, which will be located in the /app_code folder when you install doc2form v3.

    cheers,
    doug.

  • sritchie 48 posts 80 karma points
    Oct 02, 2009 @ 05:33
    sritchie
    0

    Thanks guys

    will give it a try

    Simon

  • MartinB 411 posts 512 karma points
    Jan 30, 2011 @ 01:40
    MartinB
    0

    I had the same issue just now.

    in doc2form.ascx.cs after line 1183

    SmtpClient smtp = new SmtpClient();

    i just did the following:

    smtp.EnableSsl = true;

    And in web.config the following:

     <system.net>      
           
    <mailSettings>
         
    <smtp>
                   
    <network
                           
    host="smtp.gmail.com"
                           
    port="587"
                           
    userName="[email protected]"
                           
    password="password"
                           
    defaultCredentials="false"
                   
    />        
         
    </smtp>
       
    </mailSettings>
     
    </system.net>

    I'm not getting any errors when submitting anymore, but it's late so i'll have to get my client to specify wether it works or not tomorrow, but i think it does, since it connects fine with the stmp/socket whatever :-)

  • MartinB 411 posts 512 karma points
    Jan 30, 2011 @ 14:40
    MartinB
    0

    A little update: It works.

Please Sign in or register to post replies

Write your reply to:

Draft