SMTP Authentication Using TLS (SSL)

Discussion in 'Customization & add-ons' started by joe_asto2, Jan 4, 2007.

  1. joe_asto2

    joe_asto2 New Member

    Joined:
    Aug 22, 2006
    Messages:
    68
    My SMTP server requires authentication using TLS (similar to SSL), and I also need to use a specific port to connect.

    I have learned it is possible to authenticate SMTP connections from aMember (which uses the phpMailer library) by doing the following:

    Go to: aMember CP -> Setup/Configuration -> Email -> Email Send Method

    Select the SMTP Host option, and fill in the following:
    Code:
    username:password@smtp.domain.com
    However, this method doesn't allow you to specify a specific port to connect to, and neither does it allow use of TLS/SSL for the connection.

    How can I set a specific port to connect to and enable TLS for SMTP?

    Thanks very much!
  2. joe_asto2

    joe_asto2 New Member

    Joined:
    Aug 22, 2006
    Messages:
    68
    SMTP authentication via TLS / SSL not possible

    Apparently SMTP authentication via TLS / SSL is not possible with aMember.

    Let's hope this is made possible one day!
  3. joe_asto2

    joe_asto2 New Member

    Joined:
    Aug 22, 2006
    Messages:
    68
    Just to let everyone know - I've managed to achieve this.

    If you're interested in the code, please contact me.
  4. teckmax

    teckmax New Member

    Joined:
    Sep 1, 2007
    Messages:
    1
    SMTP authentication

    Hey Joe,

    I really need to get SMTP authentication working for my Amember. Can you send me the code you used or let me know where to find it?

    Thanks,
    Nick
  5. pahcsor

    pahcsor New Member

    Joined:
    Aug 28, 2006
    Messages:
    9
    It is pathetic that amember does not support SMTP authentication for two reasons:

    1) Emails sent from "nobody" are now being rejected by most mail servers as spam. The way to overcome this is to use SMTP authentication.

    2) My server host (among many others) has permanently disabled the PHP mail () function due to new spam laws.

    Come on amember - this is a major flaw in the application! Please provide a fix for all amember versions.
  6. neutron

    neutron New Member

    Joined:
    Jul 29, 2008
    Messages:
    16
    joe_asto2 I'm interested in that code. Please contact me.
  7. pgudekar

    pgudekar New Member

    Joined:
    Feb 26, 2009
    Messages:
    1
    Hi, I am trying to send an email using SMTP with SSL Authetication. But not able to do that. I am new in PHP...can anyone tell me how to do this? I tried the above option but its worth.....please tell which and how the supporting files to be set to send an email using all SMTP SSL credentials?
  8. microvb

    microvb Member

    Joined:
    Nov 23, 2007
    Messages:
    62
  9. microvb

    microvb Member

    Joined:
    Nov 23, 2007
    Messages:
    62
    I have modified config_email.inc.php and email_test.php ... now working on common.inc.php. I will upload the modified versions of these files so that everyone can enjoy full support for SMTP with Authentication.
  10. microvb

    microvb Member

    Joined:
    Nov 23, 2007
    Messages:
    62
    Patch is complete and available for download for free as aMember SMTP Auth from MicroVB INC.

    Instructions are included in the zip file. This will replace 3 aMember files.
    No other changes have been made aside from what is documented in the included zip file.

    Enjoy!!!
  11. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @quicklinks: First off, thank you for sharing this patch with the community.

    Secondly, does this patch have the ability to start a TLS/SSL session or just allow you to specify the port/user/pass?

    Many SMTP providers, such as Google For example, will refuse sessions that do not first establish a TLS/SSL session to communicate across.
  12. microvb

    microvb Member

    Joined:
    Nov 23, 2007
    Messages:
    62
    It doesn't yet have TLS/SSL session support as I have no experience with configuring a connection to those servers.

    I would suggest give it a try and see if it works for you. If not, perhaps you could supply me with a TLS/SSL email account and what the normal configuration details are to correctly setup that account inside a common application. Preferable Outlook Express as it seems to provide the simplest layout.

    I have also posted an updated version of this patch.
    Removed: Alert() JS on test e-mail
    Added: Check to see if SMTP class has been instantiated first
  13. microvb

    microvb Member

    Joined:
    Nov 23, 2007
    Messages:
    62
    Updated it on my website to include TLS/SSL support. Please download version 1.2, and take note that I was unable to test the TLS/SSL functionality, so test it thoroughly.

    Enjoy :)
  14. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @quicklinks: Thanks! Just tested and received an "error connecting to SMTP server" when trying to connect to Gmail.

    Is there a way to enable console view of the communication attempt or have it logged somewhere to get the real error?

    For testing, you can set up a free Gmail account and it includes SMTP as described here:

    http://mail.google.com/support/bin/answer.py?hl=en&answer=13287
  15. microvb

    microvb Member

    Joined:
    Nov 23, 2007
    Messages:
    62
    1.3 Released

    SMTP for gmail working.

    Example config for Gmail connection:

    Host: smtp.gmail.com 465
    User: username@gmail.com
    Pass: *********
    Secure: SSL

    If you find this useful and can contribute, please feel free to donate at MicroVB INC, using the payment option in the top right corner of that page. You can set whatever amount you desire.

    Enjoy :)
  16. microvb

    microvb Member

    Joined:
    Nov 23, 2007
    Messages:
    62
    1.4 Released

    Fixed "Secure" drop down box so that it saves and loads correctly. This plugin is now 100% functional.
  17. questioningsuccess

    questioningsuccess New Member

    Joined:
    May 19, 2009
    Messages:
    6
    BRILLIANT, thanks!
  18. smijos

    smijos New Member

    Joined:
    Jul 1, 2009
    Messages:
    5
    I'm using quicklinks plugin, using pretty much identical settings to the prior post for gmail. I get "SMTP Error: Could not connect to SMTP host. WARNING: There was an error sending the email message in line 1345 of file common.inc.php"
  19. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Try to upgrade aMember to latest version 3.1.9 it support SMTP auth as well.
  20. smijos

    smijos New Member

    Joined:
    Jul 1, 2009
    Messages:
    5
    thanks alexander - the upgrade did the trick

Share This Page