New Zenner
- Join Date:
- Aug 2012
- Posts:
- 12
- Plugin Contributions:
- 0
SMTPAUTH Problem - need to enable ssl to send email
On 21 Aug 2012, 03:44 PM I started posting on someone else's thread. I realized I should have started a new topic because I'm dealing with a ssl email problem in version 1.5.
SheilaDee:
I am having an email problem very close to Rod44 except my host has said I must "enable SSL within your zencart software." All other settings in the Config > Email Options have been reviewed with my host staff and I have everything set exactly as they have suggested. I followed the link to the topic for ... SMTP-TLP but I haven't found anything for SSL. Could someone advise the exact steps I need to "enable SSL"? Do I need to add a .php file for SSL as was suggested for TLP and if so, could you please tell me exact directions as was done for the person needing TLP.
Thanks so much.21 Aug 2012, 04:38 PM
I forgot to include the requested details in my post. I'm using Zen Cart 1.5.0, Database Patch Level: 1.5.0 with a new install. I have a template installed by Picaflor Azul.
The website is installed on PairLite.com and they are using PHP Version: 5.3.15 (Zend: 2.3.0), Database: MySQL 5.1.56.I have read everything I could find related to email on the forum, FAQs, Wiki and I've tested several different ways. In emails with the host, the port I used on my own computer for Outlook would not work on the website and they suggested port 465 which I've corrected in the Config > email options.
21 Aug 2012, 05:37 PM
DrByte:
TLS/SSL are often treated the same. So, I would start by using the solution already posted for tls since it will most likely work for your needs.
Has your host SPECIFICALLY told you that "TLS" would be unacceptable?
Have you tried using the method described already: http://www.zen-cart.com/showthread.php?197960-email-set-up-for-SMTP-TLS&p=1136892#post1136892
21 Aug 2012, 06:09 PM
SheilaDee:
Thank you for your quick reply. I've often seen TLS and SSL written together but I didn't know if the same file would work. I didn't want to break anything so I haven't tried it. My host has not said TLS would be unacceptable, it wasn't mentioned. They simply said "enable SSL within your zencart software." I'll give it a try and report back with my results.
21 Aug 2012, 07:00 PM
Well, that didn't fix the problem. I created the file use_tls_for_smtp.php exactly as shown in the link (using notepad++) and added it to the two locations given (using FileZilla). Closed the window on my browser, reopened the browser and went to my website. Sent an email from the Contact Us page and sent an email to a customer (me) from the admin section. No emails arrived. I even checked my emails on their webmail site (different from the website) plus checked the Junk Mail folder. The two emails did not arrive.The settings I have in Admin > email options are as follows:
E-Mail Transport Method::: SMTPAUTH
E-Mail Linefeeds::: LF
SMTP Email Account Mailbox::: [email protected] (have actual email address in email options)
SMTP Email Account Password::: I put the correct password for this email address. (and this address is working fine when sent to/from Outlook Express)
SMTP Email Mail Host:::: Have the correct information according to my web host.
SMTP Email Mail Server Port::: Web host said to use 465 which I have.
Any other ideas?
Since the last posting, I tried changing the information posted on the linked topic.
<?php define('SMTPAUTH_EMAIL_PROTOCOL', 'tls'); ```I removed the new PHP file from the 2 locations, created a new PHP file called use_ssl_for_smtp.php where I used the same define except put 'ssl' instead of 'tls', then uploaded the new file to the two locations. Tested the email and it still didn't work. I have the email address added to Outlook Express on my computer and I'm able to send email through the host with no problem, I just can't get ZenCart to send email. I did have a problem originally with Outlook Express until I checked the box "Outgoing Mail Server - My server requires authentication" per the direction of my Host. I did a search from Developers Tool Kit for SMTP_EMAIL_PROTOCOL and found the following: ---------------------------------------------------------------------------------------------- /../.../..../..../.../includes/extra_datafiles/use_ssl_for_smtp.php Line #1 : define('SMTPAUTH_EMAIL_PROTOCOL', 'ssl'); ------------------------------------------------------------------------------------------ /../.../..../..../.../includes/functions/functions_email.php Line #34 : if (!defined('SMTPAUTH_EMAIL_PROTOCOL')) define('SMTPAUTH_EMAIL_PROTOCOL', 'none'); Line #200 : if (defined('SMTPAUTH_EMAIL_PROTOCOL') && SMTPAUTH_EMAIL_PROTOCOL != 'none') { Line #201 : $mail->Protocol = SMTPAUTH_EMAIL_PROTOCOL; Line #202 : if (SMTPAUTH_EMAIL_PROTOCOL == 'starttls' && defined('SMTPAUTH_EMAIL_CERTIFICATE_CONTEXT')) { ---------------------------------------------------------------------------------------------- /../.../..../..../.../my_renamed_admin_foldername/includes/extra_datafiles/use_ssl_for_smtp.php Line #1 : define('SMTPAUTH_EMAIL_PROTOCOL', 'ssl'); I noticed the 'none' in the functions_email.php and wondered if it should show 'ssl'? The comment just above Line #34 says, "If using authentication protocol, enter appropriate option here: 'ssl' or 'tls' or 'starttls'". I have no idea if this information will help troubleshoot the problem, but I hope so. I know very little about .php and the above may not be related, but I know I really need to be able to send emails from ZenCart.DrByte:
First set your Zen Cart to SMTPAUTH and provide it with your SMTP credentials.
Then to tell Zen Cart to use TLS, put the following content into a new PHP file and upload it to 2 locations:
- /includes/extra_datafiles/use_tls_for_smtp.php
- /your_renamed_admin_foldername/includes/extra_datafiles/use_tls_for_smtp.php