SMTP authentication port - where can I define this?

My SMTP host requires authentication on port 465 or 587. Where can I define this in CS-Cart 2.0.4?



thanks,

Glen

[url]Instant Demo - CS-Cart Multi-Vendor Demo Try Free for 15 days



is a start

Yep, that’s the screen with the SMTP configuration fields - but no place for the Port #.

Have you tried using the php function?

Yes, the PHP function works (mostly), but I’d prefer to use SMTP.

Glen

fill smtp host field with something like this :

mail.somesite.com:26

[quote name=‘Mehdi’]fill smtp host field with something like this :

mail.somesite.com:26[/QUOTE]



After adding my port in this manner, the error message I get is:

[QUOTE]Mailer Error: The following From address failed: from_name [/QUOTE]

instead of:

[QUOTE]Mailer Error: SMTP Error: Could not connect to SMTP host.[/QUOTE]



Note: I’m doing this testing via the “News & emails” addon. I’ve created a Newsletter and am trying to send it with the “Send to test email” field.



Glen

Not sure if this is going to work but, in /addons/news_and_emails/func.php at around line 678 find and add red part:


if ($mailer_settings['mailer_send_method'] == 'smtp') {
$new_mailer->IsSMTP();
$new_mailer->SMTPAuth = ($mailer_settings['mailer_smtp_auth'] == 'Y') ? true : false;
$new_mailer->Host = $mailer_settings['mailer_smtp_host'];
$new_mailer->Username = $mailer_settings['mailer_smtp_username'];
$new_mailer->Password = $mailer_settings['mailer_smtp_password'];
[COLOR="red"]$new_mailer->Port = '465';[/COLOR]

Thanks Charlie, but the line you referenced doesn’t seem to exist in the 2.0.4 files. CS-Cart support responded with instructions to append the port to the end of the SMTP server name (ex. smtp.myserver.com:465) as Mehdi suggested. Unfortunately, this results in the error described above. I’ve tried to isolate the problem by trying: different email accounts (Gmail, email on the same account as the site, and email hosted from our office) but all fail. I’ve also tried a new installation of CS-Cart on a different host with the same results. I did succeed with one combination: from a CS-Cart installation on a server that doesn’t require SMTP Authentication. Unfortunately, that’s not an option with our production server.



Has anyone been successful configuring CS-Cart 2.0.4 to use SMTP with SMTP Authentication?



thanks,

Glen

I meant you should [COLOR=“Red”]add[/COLOR] the line in red not amend it.



Edit:



Having read through your posts again, is this port just for news letters or is it for all mail?



If it’s for all mail you could try changing in /lib/phpmailer/class.phpmailer.php at line 164


var $Port = 25; [COLOR="Red"]<<--- change to port 465[/COLOR]

Charlie,



I misread your instructions - it had been a long week.



My SMTP headache is mostly resolved - thanks to the helpful folks at CyberLNC. I’m not sure what they changed, but it has to do with the fact that I’m using a “Parked Domain” as my primary URL now. The original URL that my account was created on is no longer used. I believe “Parked Domains” may not have a SMTP server automatically configured via they host cpanel.



In any case, I can now trigger SMTP emails from the admin for all “Notify Customer” actions (account changes, order changes, etc).



Newsletters continue to be problematic, however. When attempting to send a test newsletter, I kept getting a “The following From address failed: from_address” error message. This took a while to troubleshoot. It turns out that Newsletters must have a Mailing List applied to them. The Mailing List configuration includes the “From email” field. Unfortunately, CS-Cart passes the “From name” value to class.phpmailer.php instead of the “From email” value (BUG).



Now, with an email address in the Mailing List’s “From name” field (not “From email”), I’m able to send test newsletters to myself. The problem I’m having now is that my HTML emails don’t seem to pass the IMG SRC information correctly.



This: [HTML][/HTML]

is received as: [HTML][/HTML]



Has anyone made use of CS-Cart 2.0.4 Newsletters and resolved the linked images problem?



thanks,

Glen

Not yet because I have not included any images at this point, just text. I had a different problem with the newsletter functionality though and tech support was quick to resolve it. You may want to keep on tech support as quite a few elements of v2.0.4 could use an update/patch.