Jump to content
TNG Community
dsmith49

SSL with port 465 not working

Recommended Posts

dsmith49

Hi, could someone please tell me how to get TNG email working with SSL on port 465?  I'm having a heck of a time trying to get this set up and I know it shouldn't be that difficult.  I recently enlisted the services of an external email service that allows me to configure my site with SSL authentication and I know for sure I'm entering the right authentication information in the config.php file.  Here are my parameters:

These settings do not work, as the system says, "Could not authenticate" but I have them set up in two different sites running Joomla and they work just fine.  It's only TNG that's giving me this issue.

Any ideas?

Thanks!

Dan

Share this post


Link to post
Share on other sites
bauschaffender

Hi Dan, try to use 587. But another user in Germany found an bug inside the tngmaillib.php so the use of SMTP with SSL/TLS not works. At the moment I use a personal mod to correct this.

If the other port number not works for you I could send you the mod.

Martin

Share this post


Link to post
Share on other sites
dsmith49

Hi Martin!  I'm limited to the ports listed below by my mail sevice provider:

If I try to use port 25, my TNG doesn't like it even though it's defined in my router config and no messages will get sent.  Your mod probably won't work for me.  I'm open to other suggestions though!  There are no provisions in the software for using TLS/STARTTLS.

Dan

Edited by dsmith49

Share this post


Link to post
Share on other sites
bauschaffender

Hi Dan, ok, if you have limited your ports than test this. Following the mod part for tngmaillib.php that works on my TNG installation well (I think it is neccessary for your installation too if you want to use SMTP with encryption):

%target:tngmaillib.php%
%location:%
            require_once("class.phpmailer.php");
%end:%
%insert:after%
            require_once("class.smtp.php");                        // ADDED
%end:%

%location:%
            $mail->Port = $tngconfig['mailport'];
%end:%
%insert:before%
            $mail->SMTPSecure = "tls";                            // ADDED
%end:%

Please look at you tngmaillib.php if the class.smtp.php part are existant and insert the SMTPSecure part - test if tls or ssl works for your provider.

Do you know how you can create a mod? If not I can send you a complete mod in the evening.

Martin

Share this post


Link to post
Share on other sites
dsmith49

That is good advice, Martin!  Thanks for helping me with this.  If you would kindly send me your mod I would sincerely appreciate it.  Please contact me when you've had a chance to read this and send me a PM.  I'll reply with my email address.

Share this post


Link to post
Share on other sites
bauschaffender

Hi Dan, please test the SMTP Mod v10.0.0.0. It should work with TNG 10 or higher - below I have not looked at the code of tngmaillib.php.

For TNG v10.1.2 you don't need this mod!

Martin

Share this post


Link to post
Share on other sites
dsmith49

Thanks very much to Martin (bauschaffender) for his excellent SMTP mod!  The email on my TNG works just fine now after about a week's struggle trying to get it working.  My Ubuntu Linux server system refuses to use Postfix as the mail transport on port 25, so he saw my problem and has been working with me to get this working.

After he sent me his smtp mod, I was having a tough time trying to get it working, and when I exhausted all options, it occurred to me what would happen if I changed the ['usesmtp'] value to "0" instead of "1".  So I changed it as follows:

To my astonishment, it worked flawlessly!  Having both the mod installed and the SMTP value set to 1, it was creating a conflict.  I kept getting "The message could not be delivered" messages.

Martin, a million times thank you!  Danke Schön!!!

Now, my question for the TNG group is, why hasn't email been perfected after 10 iterations of the software?  Any information would be helpful to myself and others who are struggling with this problem.

I love TNG, I love all the different mods that the community has contributed and I will be using it for likely many years to come!

If you want to see my site, please direct your browser to http://genealogy.dansmith.ca

Cheers,
Dan

Share this post


Link to post
Share on other sites
bauschaffender

Hi Dan, if you set $tngconfig['usesmtp‘] = "0"; you don't use SMTP after and the mod does nothing. The SMTP Mod fixes the tngmaillib.php for use of SMTP and additionally encryption only.

As your provider mails you can use port 25 with TLS or port 465 with SSL. Port 587 seems to be unsupported. Please change the mails setting in the TNG admin area for the port number and also the mod settings for encryption type as the provider wrote. The mod comes with encryption type "tls" as standard (my setting). Please change it to "ssl" or "none" if your provider doesn't support "tls".

Martin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×