Page 2 of 3

Re: Mail/Smtp

Posted: Thu Oct 01, 2009 7:26 pm
by Daniel
check your error log and post the details.

Re: Mail/Smtp

Posted: Fri Oct 09, 2009 5:48 am
by sgfx
After replacing the Mail code with the code Daniel provided (thank you Daniel) I still had no luck getting mail out.

After checking all my settings both on OCart and my host (bluehost) who requires smtp authorization. Without any success, I decided to try changing the seatings in OCart to "MAIL" insted of "SMTP".

BINGO!! this worked. Why it worked I do not know?

So if anyone is still struggling with outgoing email try changing the setting found in
Admin -> Configuration -> Setting -> Mail

Good Luck

Re: Mail/Smtp

Posted: Sat Oct 10, 2009 3:24 am
by paulsvang
It worked after I changed the mail.php code and change it from "smtp" to "mail" in the backend.

Re: Mail/Smtp

Posted: Sun Oct 11, 2009 7:50 pm
by okada1314
how to set esmtp on php.ini??

Re: Mail/Smtp

Posted: Sun Oct 11, 2009 8:13 pm
by Daniel
axxies wrote:Thanks Daniel, but I tried that piece of code before I made the posting. It doesn't work for my hosting company that uses port 587 for SMTP. The bug/problem remains.

Daniel wrote:I posted a new fixed version somewhere here it is again:

Code: Select all

.
.
.

why don't you use the standard mail function?

you only need smtp if the standard php mail function has been disabled!

seriously your host requires you to use smtp for you to send mails from your web server? I don't think so unless its a free host!

Re: Mail/Smtp

Posted: Mon Oct 12, 2009 2:20 pm
by axxies
Daniel wrote:
axxies wrote:Thanks Daniel, but I tried that piece of code before I made the posting. It doesn't work for my hosting company that uses port 587 for SMTP. The bug/problem remains.

Daniel wrote:I posted a new fixed version somewhere here it is again:

Code: Select all

.
.
.

why don't you use the standard mail function?

you only need smtp if the standard php mail function has been disabled!

seriously your host requires you to use smtp for you to send mails from your web server? I don't think so unless its a free host!

Yes, it does require that. On top of that - does it matter whether this is so or not? There appear to be a bug. The bug won't disappear just because of opinions. The fix appears to be for Google Mail (where you apparently can choose other ports for SMTP), but not everyone runs Google Mail.

(in order not to appear as a complainer/whiner I must stress that I think that OpenCart is probably the best webshop software that I have seen sofar, the mail bug is just very annoying and prevents me from using OC)

Re: Mail/Smtp

Posted: Mon Oct 12, 2009 8:26 pm
by Daniel
The fix should work for other mail servers aswell.

the is a standard protcal spec on how mail should be sent.

who is your smtp mail provider?

Re: Mail/Smtp

Posted: Mon Oct 12, 2009 10:34 pm
by axxies
Surftown

...but partially because of this I will swap supplier to another company where this will work. I need to use OC.

Re: Mail/Smtp

Posted: Fri Oct 16, 2009 5:45 pm
by axxies
I tried the same thing at another supplier and yes, it works - kind of. Due to that they need to handle several different customers, they need to set "Sender" to my web account name which is no the same as the mail address I prefer to use for my webshop, they also supply a "Reply-to" address which is the admin mailaddress for OpenCart. This means that the sendout of the mail doesn't look very "professional".

I have used a CMS system for quite many years, it's called e107 (e107.org). I have _never_ had any problems with that system's mail setup. On the contrary. Today I installed it at my latest web hosting company just to see if it works there too and it does. e107 handles SMTP and "Mail" (=the settings in php.ini?) as it should and no problem arises.

So in all, I still think this is a bug.

Just thought I should let you know. If I were any good at PHP I would copy the code of e107 and adjust it to OpenCart, but I am not. Sorry.

Re: Mail/Smtp

Posted: Fri Oct 16, 2009 7:31 pm
by Daniel
yuo should not need to use SMTP on paid hosting.

Re: Mail/Smtp

Posted: Sat Oct 17, 2009 12:49 am
by axxies
Daniel wrote:yuo should not need to use SMTP on paid hosting.
Maybe there can be such opinions, but the fact remains. In fact I actually see SMTP as the more "professional" way of treating the mail handling, SMTP keeps me in control, if I use the other option I let others have the control I should have, but that's just my opinion.

Please don't take this wrong. I do think OpenCart is a superior cart software. It's just the mail that doesn't work the way it should, IMHO.

I guess I just have to get better in PHP and rip the code from e107 and adjust it to OpenCart. :)

Re: Mail/Smtp

Posted: Sat Oct 17, 2009 2:03 pm
by axxies
I am having a look at the e107 code right now and I can conclude that they have got their code from phpBB. :)

Re: Mail/Smtp

Posted: Sat Oct 17, 2009 7:37 pm
by Daniel
axxies wrote:
Daniel wrote:yuo should not need to use SMTP on paid hosting.
Maybe there can be such opinions, but the fact remains. In fact I actually see SMTP as the more "professional" way of treating the mail handling, SMTP keeps me in control, if I use the other option I let others have the control I should have, but that's just my opinion.

Please don't take this wrong. I do think OpenCart is a superior cart software. It's just the mail that doesn't work the way it should, IMHO.

I guess I just have to get better in PHP and rip the code from e107 and adjust it to OpenCart. :)

usign SMTP is not professional at all. You are more likly to have you mails rejected by servers as spam.

Did you try the updated code I sent?

Re: Mail/Smtp

Posted: Sat Oct 17, 2009 7:38 pm
by Daniel
does your site have SSL?

you need SSL to send via that port.

Re: Mail/Smtp

Posted: Sun Oct 18, 2009 1:22 am
by liquider
This new Mail class indeed does work with my Google Apps!!! (why is it not included in the default release download?)

It auths with "ssl://smtp.gmail.com" as server on port 465.

Thank you.

Re: Mail/Smtp

Posted: Sun Oct 18, 2009 1:33 am
by Daniel
it will be in the next release along with google checkout, google talk, google base, Google Sitemap.

Re: Mail/Smtp

Posted: Sun Oct 18, 2009 1:58 am
by liquider
Release Early, Release Often ;) :P

Re: Mail/Smtp

Posted: Mon Oct 19, 2009 1:48 pm
by axxies
Hmmmm... Is it just me who have these problems?

Result after creating an account using the new mail fix:

Port 465:

Code: Select all


Notice: fputs() [function.fputs]: send of 13 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 180
Notice: fputs() [function.fputs]: send of 42 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 196
Notice: fputs() [function.fputs]: send of 18 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 212
Notice: fputs() [function.fputs]: send of 49 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 245
Notice: fputs() [function.fputs]: send of 42 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 262
Notice: fputs() [function.fputs]: send of 6 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 297
Notice: fputs() [function.fputs]: send of 1079 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 313
Notice: fputs() [function.fputs]: send of 3 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 314
Notice: fputs() [function.fputs]: send of 6 bytes failed with errno=32 Broken pipe in /home/myaccount/domains/my-domain-name.com/public_html/system/library/mail.php on line 330
Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/domains/my-domain-name.com/public_html/index.php:67) in /home/myaccount/domains/my-domain-name.com/public_html/system/engine/controller.php on line 23


Port 587:

same as above



Port 25:

same as above

Re: Mail/Smtp

Posted: Sat Oct 31, 2009 3:05 am
by npkashyap
mail.php is still having problem even after submitting here thrice, the new code. Daniel please do something fast. :o

Re: Mail/Smtp

Posted: Sun Nov 29, 2009 5:24 pm
by Liew2020
Hi All,
I faced the same problem as any others faced. I appreciate anyone can speed up with an solution. As you know email notification is one of the most important features in the system to create communication with our customers.

Thanks and appreciated. O0

Best Regards,
Jimmy Liew