Post by hfinlay10 » Thu Apr 12, 2012 8:24 am

Looking at migrating from OsCommerce. Really impressed with layout and usability of opencart, but simply cannot get the email function to work.

I've tried php Mail, which my host says should work, but it doesn't. Also cannot get SMTP to work either.

Really frustrating because without email the software is unusable. I've trawled the forum for solutions but it seems to be a tricky area with no simple answer.

I'm using 1.5.2.1 and having spent ages trying to solve the problem am just about ready to give up on it.

Any helpful ideas out there?

Cheers
Last edited by hfinlay10 on Wed Apr 25, 2012 8:50 pm, edited 1 time in total.

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by Avvici » Thu Apr 12, 2012 9:31 am

You can deal with SMTP problems with your host provider. Open Carts simply offers the fields to enter the correct parameters.

As far as you email not working I take it you are talking about in general yes? Order confirmation emails, status change emails etc?

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by hfinlay10 » Thu Apr 12, 2012 10:52 am

Hi, thanks for the replies,

@avvici: no, emails not working at all. If I set Mail as the email option, then on screen message is that emails have been sent, but no email is deliver. If SMTP is the option, then using Contact Us, on sending, cart freezes and displays blank page with nothing, not even error message. displayed path is .../ocstore/index.php?route=information/contact

@culverton12: thanks, I am still having problems with php Mail and SMTP. Any help appreciated.

Cheers

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by Avvici » Thu Apr 12, 2012 11:03 am

Just try phpMAIL. It's less buggy and if you can't get SMTP to work....that will. It's easy to choose either or in the admin under Mail options.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by hfinlay10 » Thu Apr 12, 2012 11:22 am

i have tried php Mail, and it appears to work but no mail actually gets sent.

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by hfinlay10 » Thu Apr 12, 2012 2:13 pm

Still can't work out why mail() is not working . Any more clues? Thx.

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by hfinlay10 » Wed Apr 25, 2012 4:41 pm

Still searching for a possible cause for mail() appearing to work but not sending out any emails? Thanks.

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by Avvici » Wed Apr 25, 2012 5:19 pm

If php mail is not working then you need to contact your hosting provider and let them know. Perhaps your PHP configuration is not correct. Have them test it out for you. In the meantime an easy way to see your configuration is just to create a php page called info.php and inside it paste this code:

Code: Select all

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>
Save it and upload to the root of your server then go to http://www/yourdomain.com/info.php

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by hfinlay10 » Wed Apr 25, 2012 6:37 pm

@avvici

i have checked that php mail() is working by using a very basic php script from the root of my server, and it works fine.

I did what you suggested received the php info, but don't know how to interpret the results. What should I look for that would stop mail() from working?

Thanks for your help.

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by Avvici » Wed Apr 25, 2012 6:39 pm

Did you upgrade to 1.5.2.1 ?

Can you receive mail in any way at all? Order confirmation, newsletter, register, etc? Nothing works?

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by hfinlay10 » Wed Apr 25, 2012 6:44 pm

No. the first install i did was 1.5.2.1

When php mail() is selected, everything works fine but *no* mail is sent.

When SMTP is selected (with supplied username and password), confirmation and order history etc mail is sent and received fine, but I get errors on new account registration

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by Avvici » Wed Apr 25, 2012 6:56 pm

First, your problem isn't directly SMTP or MAIL(), it's something else so don't get lost in a sea of this or that...
You said that you are getting errors with SMTP but no error displayed? Did you check your error log for anything?

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by kisist1 » Wed Apr 25, 2012 7:21 pm

Hello!

I have one different problem, but it connects to e-mails, and I didn't wanted to open a new topic :)

Is it possible to disable to send the order update letters to my e-mail address? I mean, I want to send them only to the costumer, and not to me. When I update one purchase, and I check in the box to "Notify Customer:" then the system automatically send one e-mail to the customer (It's OK), and one to me (I don't want this).

Sorry for my english, I hope I was clear. :)

Thank you for your help!

Newbie

Posts

Joined
Sat Feb 25, 2012 10:20 pm

Post by hfinlay10 » Wed Apr 25, 2012 7:30 pm

@avvici: yes, error log shows nothing related to SMTP or mail. The only error I get with SMTP is when a new user registers and presses continue: then the following error message:

Notice: Error: RCPT TO not accepted from server! in /home/<myserver>/public_html/ocstore/system/library/mail.php on line 614

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by Avvici » Wed Apr 25, 2012 8:04 pm

Here is the code in which displayes your error from within the mail class:

Code: Select all

if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) {
                                                trigger_error('Error: RCPT TO not accepted from server!');
                                                exit();                                                 
                                        }
Most folks that get that error solve it by switching to MAIL in admin settings. However, you are still getting nothing when using MAIL. You did say that you tested PHP Mail on your server and it worked. That really doesn't mean much because you could in theory be testing on an older version of PHP Mail with older code. Make sure your host is using the latest version of PHP Mail.

Second Theory: That error could also pop up because of IP ADDRESS issues or firewall issues.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by hfinlay10 » Wed Apr 25, 2012 8:18 pm

Ok, thanks.

Not sure what version of PHP Mail host is using, but PHP version is 5.2.17 if that helps. My host insists that php mail will work if it is used correctly.

Re IP address or firewall issues: how would I explore these further?

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by hfinlay10 » Wed Apr 25, 2012 8:39 pm

I solved the problem my changing the SMTP server name in settings from 'SMTP.<my domain>' to 'localhost'

This seems to have cured it--fingers crossed.

And thanks for your help @avvici

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by hfinlay10 » Wed Apr 25, 2012 8:55 pm

My only problem now is that I am receiving 2 copies of all emails sent to the admin email address! Still, that is much better than errors or no emails :)

New member

Posts

Joined
Thu Apr 12, 2012 8:20 am
Location - Australia

Post by kisist1 » Wed Apr 25, 2012 9:58 pm

kisist1 wrote:Hello!

I have one different problem, but it connects to e-mails, and I didn't wanted to open a new topic :)

Is it possible to disable to send the order update letters to my e-mail address? I mean, I want to send them only to the costumer, and not to me. When I update one purchase, and I check in the box to "Notify Customer:" then the system automatically send one e-mail to the customer (It's OK), and one to me (I don't want this).

Sorry for my english, I hope I was clear. :)

Thank you for your help!
I knew It is a different problem, but please help me. Is it even possible to turn it off? I receive these unwanted e-mails since I updated from 1.5.1.x
I searched the setting in the admin panel, but I see no options to disable it.

Newbie

Posts

Joined
Sat Feb 25, 2012 10:20 pm

Post by Avvici » Wed Apr 25, 2012 10:22 pm

Bu default, it shouldn't be doing that. Order History (notify customer emails) are only sent to customer. If you are getting one to your admin email as well then something is FUBAR in your install.

The function you want to pay attention to is public function addOrderHistory($order_id, $data) {

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 382 guests