Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 09-24-2014 20:44:06

akaraptis
Member
Registered: 01-13-2010
Posts: 7

Help Switching to SMTP Email

Hello. I recently upgraded to v8 of the software and was using plain old "mail" email for a while.

I've had a continual problems receiving some of the order emails. About 1 in every 8 order confirmation emails sent to me (the store owner) by the software get lost. I know they are not being deleted automatically by a spam filter since the emails go to Gmail and I've already whitelisted the FROM addresses and I check the spam folder. This problem has happened across 3 different web hosting companies and across versions 7 and 8 of the ClickCartPro software. The folks at Kryptronic told me that upgrading to v8 might help email reliability, but the problem remains.

I'd like to try sending emails through SMTP. Maybe that will help. I've attempted to do this by updating my store's config.php file with valid SMTP details provided by my web host. These same details (SMTP server name, port number, username, password) work great when plugged into MS Outlook, allowing me to send and receive email. But when plugged in to ClickCartPro's config.php file I get email errors. When I turn on ClickCartPro debugging I see the following specific error message:

CORE_Mail::send_email: Error: authentication failure [SMTP: Invalid response code received from server (code: 535, response: 5.7.0 Error: authentication failed: another step is needed in authentication)]

Note that this is not a problem with the server name, username or password. If I change any of those details to make it incorrect I get a different and more straight-forward connection error message. But this mysterious "another step is needed in authentication" message shows up even when all the details are correct. My host supports both non-SSL (port 25) and SSL (port 465) so I tried both of those but both result in the same error. Here's an example of how I've updated the settings inside config.php:

$config['core.mail_host'] = 'ssl://smtp.webfaction.com';
$config['core.mail_port'] = '465';
$config['core.mail_user'] = 'valid SMTP username that works in MS Outlook';
$config['core.mail_pass'] = 'valid SMTP password that works in MS Outlook';

or

$config['core.mail_host'] = 'smtp.webfaction.com';
$config['core.mail_port'] = '25';
$config['core.mail_user'] = 'valid SMTP username that works in MS Outlook';
$config['core.mail_pass'] = 'valid SMTP password that works in MS Outlook';

Any ideas what I am doing wrong? Is there some obscure problem communicating between ClickCartPro and my web host's SMTP setup?

Thanks very much for your time.

Offline

 

#2 09-24-2014 20:47:21

akaraptis
Member
Registered: 01-13-2010
Posts: 7

Re: Help Switching to SMTP Email

By the way, I updated the other two mail-related variable inside config.php to look as follows:

$config['core.mail_mailtype'] = 'smtp';
$config['core.mail_sendmail'] = '';

I should also note that the way I am testing this is by using the System: Send Mail Message tool inside my ClickCartPro admin. It works fine when I set:

$config['core.mail_mailtype'] = 'mail';

But I'd love to try SMTP if possible.

Offline

 

#3 09-25-2014 07:46:00

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19735
Website

Re: Help Switching to SMTP Email

Both of the config layouts you've provided look good.  Either should work.  If you're using mail on the same server as the website, try hostname localhost with port 25 and no authentication parameters (blank).


Nick Hendler

Online

 

#4 09-25-2014 10:19:00

akaraptis
Member
Registered: 01-13-2010
Posts: 7

Re: Help Switching to SMTP Email

Thanks for the suggestions. I will try them shortly. Could you also let me know if my attempt at using the "ssl://" prefix is the correct way to use SSL? My email provider also supports TLS, so if I wanted to try that should I make it look like the following?

$config['core.mail_host'] = 'tls://smtp.webfaction.com';
(with the correct port, username and password of course)

Offline

 

#5 09-25-2014 11:05:26

akaraptis
Member
Registered: 01-13-2010
Posts: 7

Re: Help Switching to SMTP Email

We've now tried localhost on port 25 both with and without name/pass. No good, which I figured would be the case since our host (WebFaction.com) is known for handling security in a professional way so I doubted they'd allow anonymous SMTP sending. Thank you for the suggestion anyway.

We also tried TLS with and without the "tls://" prefix. No good. And the error message is always the same, that odd "another step is needed" wording, making it almost sound like ClickCartPro's code to send emails is not handling the SMTP authentication handshake in a complete way.

We also tried uploading the popular PHPMailer library and writing our own simple test page that sent SMTP mail through this same account. It works fine in all modes (insecure 25, SSL 465, TLS 587). This puts us in the awkward position of knowing that it works everywhere (from within MS Outlook, from our own code with PHPMailer, from webmail, etc.) except for from within ClickCartPro. : (

Any other suggestions?

Thanks very much for your time.

Offline

 

#6 09-26-2014 08:16:21

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19735
Website

Re: Help Switching to SMTP Email

I have one more suggestion.  Download a new PEAR Mail package from:

http://download.pear.php.net/package/Mail-1.2.0.tgz

Extract locally.  Upload the contents of that archive to your CCP install's {private}/pear directory, replacing the files that are there (Mail.php and the Mail directory).  This will update the PEAR Mail that CCP uses from version 1.17 to 1.2.  This may fix the issue - especially if your host is using a newer authentication method.

Let me know how that goes.  Alternatively, you can use sendmail directly, it's much better than PHP mail() and offers the same functionality as SMTP.


Nick Hendler

Online

 

#7 09-26-2014 13:56:39

akaraptis
Member
Registered: 01-13-2010
Posts: 7

Re: Help Switching to SMTP Email

Thanks for the suggestion. We downloaded the latest version of PEAR you linked to, extracted, and uploaded into our ClickCartPro core-private/pear folder, overwriting existing files. We get the same results when testing SMTP email. It throws the same odd error message. Normal PHP "mail" still works fine. We checked with our web host and they were baffled. They say their SMTP servers use the same basic authentication methods used by most other hosting companies, nothing fancy or new.

How would we set the variables inside the config.php file if we wanted to use sendmail? I understand I'd get the absolute path to sendmail from my web host, but how should all the variables be set?

Thanks very much for your time.

Offline

 

#8 09-27-2014 11:31:23

dh783
Moderator
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Help Switching to SMTP Email

Some time ago I had to make an edit to the smtp.php file in the pear script to correct a problem with my mail server, I had to replace the call for localhost to my mail server fully qualified name. I made the  edit in "ccp8directory">pear/Mail/smtp.php at :

Code:

/**
     * Hostname or domain that will be sent to the remote SMTP server in the
     * HELO / EHLO message.
     *
     * @var string
     */
    var $localhost = 'localhost';

At the time I was getting a hello error even tho I had the correct mail server name in my config file so I am not sure if this will help with your problem

John.

Offline

 

#9 09-27-2014 13:46:31

akaraptis
Member
Registered: 01-13-2010
Posts: 7

Re: Help Switching to SMTP Email

Thanks for the suggestion, but SMTP still doesn't work even if I hard code my correct fully qualified email server name into the $localhost variable inside the PEAR smtp.php file. Not sure what the problem is. The SMTP server still works great from MS Outlook and custom PHPMailer code. We've switched to using sendmail and it seems to work so far. We can send test emails using sendmail, so we'll see if it improved the percentage of emails that get through to our Gmail recipient.

Offline

 

#10 09-28-2014 08:11:35

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19735
Website

Re: Help Switching to SMTP Email

Config for sendmail will look like:

$config['core.mail_mailtype'] = 'sendmail';
$config['core.mail_sendmail'] = '/usr/sbin/sendmail';
$config['core.mail_host'] = '';
$config['core.mail_port'] = '';
$config['core.mail_user'] = '';
$config['core.mail_pass'] = '';

The path I input for sendmail is valid on 90% of Linux/Unix servers.  Also /usr/bin/sendmail is popular.


Nick Hendler

Online

 

#11 09-28-2014 10:09:04

akaraptis
Member
Registered: 01-13-2010
Posts: 7

Re: Help Switching to SMTP Email

Thanks. Like I said, we had already figured out the sendmail settings through trial and error. It seems to work. I'll come back and comment if it fails for any reason or if we still don't receive the emails reliably.

Offline

 

#12 02-15-2015 03:34:07

mdowning
Member
From: California
Registered: 11-05-2010
Posts: 725
Website

Re: Help Switching to SMTP Email

Nick,

Both of my installations are not sending mail either, plus I can not log into the older install anymore. The new installation let's me log into it and make a few minor changes but will not let me update categories, pages and other areas. Instead, attempts to update or edit those areas causes the system to jump to the front end...

Here is the resulting address bar link when trying to update a category.
http://shopwp.kchostingetcetera.org/adm … p;offset=0

webmaster wrote:

Config for sendmail will look like:

$config['core.mail_mailtype'] = 'sendmail';
$config['core.mail_sendmail'] = '/usr/sbin/sendmail';
$config['core.mail_host'] = '';
$config['core.mail_port'] = '';
$config['core.mail_user'] = '';
$config['core.mail_pass'] = '';

The path I input for sendmail is valid on 90% of Linux/Unix servers.  Also /usr/bin/sendmail is popular.

Last edited by mdowning (02-15-2015 03:34:45)


http://tuxedothemes.org/
Wordpress Themes for business, blogs and personal use.

Offline

 

#13 02-20-2015 11:01:25

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19735
Website

Re: Help Switching to SMTP Email

You have serious hosting issues.  Contact your provider.


Nick Hendler

Online

 

Board footer