Post by Xsecrets » Wed Nov 16, 2011 12:17 am

http://www.opencart.com/index.php?route ... on_id=3932

This mod requires vqmod to function. You can get it at http://www.vqmod.com

This mod replaces the send function of the mail class with a wrapper for phpmailer. It may or may not solve problems that people have with the mail system. Give it a try and let me know how it goes. This is a free mod and uses vqmod to implement the changes, so you can revert very quickly if it does not work properly.

To use with google mail use the following settings
Mail Protocol: SMTP
SMTP Host: smtp.googlemail.com
SMTP Username: your full gmail address blah@gmail.com
SMTP Password: your gmail password
SMTP Port: 587

When using SMTP it uses TLS for port 587 and SSL for port 465

mail protocol setting of mail uses php mail() function.

This mod has not had extensive testing. It's only been tested in a few configurations, and is currently only for 1.5.1.3.
If it seems to help people and there is demand I may backport it to other versions.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by OSWorX » Fri Nov 18, 2011 4:57 am

Hello Xsecrets,

if you are using the native phpMailer class I can confirm you that it solves all problems OpenCart has with his own built mailclass.
I am using phpMailer now since more than a year in my modufied OpenCart version OCIE and had (and having) not one missed or false or as spam marked email.
My clients too.

The standard OC-mailclass should be repaced with this.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Xsecrets » Fri Nov 18, 2011 5:05 am

yes it's just the standard phpmailer class. Basically all I did was to change the mail class send function to be just a wrapper around the default phpmailer class. In my limited testing it seems to work fine. I tested with default php mail() and with gmail. I didn't do any extensive testing on other smtp settings. I did notice that it fixed the problem with the logo not showing up in thunderbird.

I really only did this because I just got through doing a bunch of work with phpmailer for a custom project I am working on and figured I would take a few minutes to cram it into opencart since I know I see people having problems on a semi-regular basis.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by OSWorX » Fri Nov 18, 2011 5:08 am

As written: phpMailer solves all problems the built-in class has/produces.
And it works also with OpenCart 1.4.x - to use it with those versions you have to adopt your script.
And it works also with SMTP.

What would be fine if your script could handle also the additonal settings phpMailer has.
Optionally using them is a fine thing and could help in some situations.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Xsecrets » Fri Nov 18, 2011 5:23 am

well yes, but like I said it was just something I did real quick, and it only changes that one file. I didn't want to go digging through all the places where mail is generated and change everything, so I simply took the information opencart has and wrapped it into the phpmailer class. It's very similar to one I found that someone did for 1.4.x, but I haven't seen that one in a long time. I think it may have even gotten lost in the forum problem that happened a long time ago, also mine only includes the two needed class file and the license file and not all the documentation like the other one did, and I use vqmod so people don't have to overwrite a core file.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by hellogoodbye » Wed May 02, 2012 1:16 am

aw is not compatible with 1.5.1.1?

New member

Posts

Joined
Wed May 04, 2011 6:33 am

Post by faru » Wed May 23, 2012 1:12 am

I'm using the 1.5.1.3 version of OpenCart. Install the extension following the instructions (to rename vqmod/xml/PHPMailer-1.5.1.xml_ to remove the _ and rename PHPMailer-1.5.2). I have my page in a BlueHost server and I get this error:

Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.googlemail.com:587 (Connection timed out) in /home4/xxx/public_html/xxx/system/library/phpmailer/class.smtp.php on line 135SMTP Error: Could not connect to SMTP host. Warning: Cannot modify header information - headers already sent by (output started at /home4/xxx/public_html/xxx/index.php:104) in /home4/xxx/public_html/xxx/vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home4/xxx/public_html/xxx/index.php:104) in /home4/xxx/public_html/xxx/vqmod/vqcache/vq2-system_engine_controller.php on line 29

New member

Posts

Joined
Wed Oct 26, 2011 3:05 am

Post by pueblohost » Tue Jun 26, 2012 11:46 am

For server administrators can solve this error just adding the port 465 in TCP_IN and TCP_OUT in the settings of your firewall

Newbie

Posts

Joined
Tue Jun 26, 2012 11:41 am

Post by OSWorX » Sun Jul 01, 2012 12:48 am

And one 'side note' for all who are using this module and languages NOT English:
you have to change the encoding inside the file 'class.phpmailer.php' from iso-8859-1 to utf-8.

Or edit the xml.file search for

Code: Select all

$mail  = new PHPMailer();
and add after

Code: Select all

$mail->CharSet = 'utf-8';
or whatever encoding you need (best from language file).

Otherwise you (your costumers) will recieve 'fancy' emails.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by antoncona » Sat Mar 23, 2013 11:38 am

I just started to use PHPMailer but I got is error message any time I sent an email

PHP Notice: Array to string conversion in /home4/xxxx/public_html/system/library/phpmailer/class.phpmailer.php on line 1466 ???

I am using OC 1.5.1

Any Help please

Newbie

Posts

Joined
Wed Mar 06, 2013 2:55 am
Who is online

Users browsing this forum: Google [Bot] and 9 guests