Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

email not emailing?


unistar

Recommended Posts

  • Replies 69
  • Created
  • Last Reply

Hi all -

I tried using email_test that John suggested for testing. No e-mail is sent. I read that this test sent two e-mail "one using the native PHP mail() function, and a second email using the email class osCommerce".

I had reinstalled osCommerce 2.2 ms2 to another directory to verify this test - and the result is the same.

 

Can someone help me sort this out? Reinstall of osCommerce shows that it is not the software. I don't think it's PHP/mail on my ISP because I'm running phpBB 2.0.11 and it is sending out e-mail fine. It's just osCommerce that stopped sending e-mail. I have checked configuration several times - same configuration that worked in the past.

 

Is it reasonable to get switch my domain to another ISP to try this out? It's important for me to be able to use eMail form osCommerce. Will it help if I file a bug report?

 

Thanks in advance for any tips,

 

Peter

Link to comment
Share on other sites

  • 2 months later...

I have the same problem, some customers don't recieve any mail.

 

I've tried to install the same shop, same database, same configuration on a different server:

 

Server I (Does not work):

PHP Version: 4.3.10 (Zend: 1.3.0)

sendmail_from: no value no value

sendmail_path: /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i

 

Server II (Does work):

PHP Version: 4.3.11 (Zend: 1.3.0)

sendmail_from: [email protected] [email protected]

sendmail_path: /usr/sbin/sendmail -t -i -f customerbounce@****.net /usr/sbin/sendmail -t -i -f customerbounce@****.net

(**** edited by me)

 

Could this be the troublemaker, sendmail_from ?

Link to comment
Share on other sites

Hello

 

I have the same problem. There is no email notification.

I used the email_test and it only works with the php native way. Not with the OSCommerce class.

Is there any additional configuration to do?

Link to comment
Share on other sites

Hi. I'm having the same problem.

 

Whenever I try to create a new account, the email is never sent to the email I enter.

 

I've read in this post where certain servers were restricting delivery of some emails perhaps, but I've tried 3 different domains (yahoo, verizon & panix) on my tests, but none receive the email.

 

I don't think the email is ever sent, though.

 

If I use the Send Email tool w/in the admin, that is sent and delivered with no problem, either.

 

Within the admin config (mystore page), I have root@localhost set up as the E-Mail From. (I did try [email protected], as well as my own email address that's set in the E-Mail Address, but that didn't help).

 

Within the admin config (email options page), I have:

E-Mail Transport Method = sendmail

E-Mail Linefeeds = LF

Use MIME HTML When Sending Emails = false

Verify E-Mail Addresses Through DNS = false

Send E-Mails = true

 

Help. :)

 

Tnx!

Link to comment
Share on other sites

Help.

 

I still haven't figured this problem out.

 

Some have posted that perhaps it's an issue w/the ISP, but then why would the Send Email tool w/in the admin work?

 

I've tried to request help from the ISP, but they're suggesting that it is a tool problem and so it's not for them to fix.

 

Help.

 

Tnx,

_C

Link to comment
Share on other sites

  • 2 weeks later...

i tried and it says all emails sent!

 

but they aren't sent and no errors came up - so what does this mean?

 

my emails (admin contact and order emails) were working fine but now NO emails are working...

 

i guess it could be down to mods i installed but cant for the life of me work it out...

 

can anyone please point out the name of every file that controls the email sending function

 

thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I have the same problem, some customers don't recieve any mail.

 

I've tried to install the same shop, same database, same configuration on a different server:

 

Server I (Does not work):

PHP Version: 4.3.10 (Zend: 1.3.0)

sendmail_from: no value no value

sendmail_path: /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i

 

Server II (Does work):

PHP Version: 4.3.11 (Zend: 1.3.0)

sendmail_from: [email protected] [email protected]

sendmail_path: /usr/sbin/sendmail -t -i -f customerbounce@****.net /usr/sbin/sendmail -t -i -f customerbounce@****.net

(**** edited by me)

 

Could this be the troublemaker, sendmail_from ?

Link to comment
Share on other sites

Help.

 

I still haven't figured this problem out.

 

Some have posted that perhaps it's an issue w/the ISP, but then why would the Send Email tool w/in the admin work?

 

I've tried to request help from the ISP, but they're suggesting that it is a tool problem and so it's not for them to fix.

 

Help.

 

Tnx,

_C

 

-----------------------------------------

My hosting version is:

PHP Version: 4.3.2 (Zend: 1.3.0)

sendmail_from: [email protected]

sendmail_path: /usr/sbin/sendmail -t -i

 

It seems that my gmai.com and own domain can receive email but not my other ISPs. My webhosting cust support engineer told me about some providers block email from their [email protected], as it is considered spamming.

Email sent from tools>Send Email only delivered to my own domain. Maybe it gets rejected by spam filtering as well.

Does osC use root ID when sending email?

Link to comment
Share on other sites

My assumption half correct.<p>

I am using sendmail in osC<p>

I think the emails get filtered by ISP/hosting spam service.<br>

When I checked the email header it shows as below:<br>

"X-mxGuard-Sender: [email protected]"<p>

So, the email got rejected. It has nothing to do with osC configuration.<p>

 

Maybe should try using smtp...

Link to comment
Share on other sites

  • 7 months later...
  • 1 year later...

I too am having problems with the email function on 2 sites.

 

i have run the email_test.php as per the very useful contribution and tried sending the message to a yahoo.co.uk and to my domain. I receive both messages when sending this way.

 

In Admin I have tried changing the LF to CRLF and Sendmail to SMTP and all combinations of the four. The config in My Store looks like this:

 

Store Name M***** Ltd

Store Owner M***** Ltd

E-Mail Address ga*****[email protected]

E-Mail From admin@The*****Shop.com

Country United Kingdom

Zone Info

Expected Sort Order desc

Expected Sort Field date_expected

Switch To Default Language Currency true

Send Extra Order Emails To contact@the*****shop.com

 

 

My email options look like this:

E-Mail Transport Method smtp ***This setting has been tried in all combinations***

E-Mail Linefeeds CRLF ***This setting has been tried in all combinations***

Use MIME HTML When Sending Emails false

Verify E-Mail Addresses Through DNS false

Send E-Mails true

 

Can ANYONE at all offer any info as to why none of the email address above receive any order confirmations. If I go into admin and Edit any order info with the Notify Customer box checked, no-one gets any email. I should mention that on the site above all products are priced £0.00 and delivery is flat rate of £0.00 but at the moment this is set to £1.01 purely to see if the zero values somehow stopped the emails being sent. The other site has Items at various values and various delivery fees from free for downloads to £6.50 for postal delivery.

 

This problem affects both of the sites I am running. Please please please HHEELLPP. There is a Snickers (or Mars if you prefer) in it for the right answer!!

Link to comment
Share on other sites

Hi there

 

I'm new to Oscommerce, I've just created a flash header for my site it's a standard flash header with no link buttons on it, I've configured the header.php file so that the flash image can be displayed, it works perfect. The only problem is that when I chick on any of the links on the website the flash image reloads, this causes a delay and is making my site slow......is there any way of making the flash image just display once when the site loads for the first time without refreshing everytime a link or button is clicked......

 

Any help would be much appreciated

 

Edwin

Link to comment
Share on other sites

  • 3 weeks later...
I solved this problem by install total smtp file from contributions

 

You'll need to install the following osCommerce module: http://www.oscommerce.com/community/contributions,901 and set then go into the osCommerce settings and configure it to use SMTP as the sending method.

 

If you still have problems after installing that module, please let us know.

 

kind regards

 

George Sedrak

Link to comment
Share on other sites

You'll need to install the following osCommerce module: http://www.oscommerce.com/community/contributions,901 and set then go into the osCommerce settings and configure it to use SMTP as the sending method.

 

If you still have problems after installing that module, please let us know.

 

kind regards

 

 

 

Thanks for posting this. I was having this issue and searched threw a lot of threads and tried a few different tricks or fixes and none of them worked for this particular issue.

 

I couldn't use the contact us form or tell a friend feature for any hotmail or gmail free accounts.

 

 

I ran the smtp_sql.sql file on my sql query within me php myadmin on my host cp .

 

then I uploaded the 4 php files to the correct locations.

 

Then I set the smtp settings in email option on admin. I didn't have to enter my password.

 

the email.php files provided with this contribution didn't work for me so I went back to my old ones

 

 

 

I got it working but I was wondering why it now has multiple places to enter smtp settings. It has several duplicated fields ?

 

Thanks again for the contribution and the links to it.

 

Chris

Link to comment
Share on other sites

  • 2 weeks later...

brilliant! that STMP contribution worked great and fixed my problem!

 

Here are my oscommerce settings once the contribution was installed and the sql file imported as per instructions

 

E-Mail Transport Method smtp

E-Mail Linefeeds CRLF

Use MIME HTML When Sending Emails true

Verify E-Mail Addresses Through DNS false

Send E-Mails true

SMTP Server Host Address linux.ivd.com.au (can find this in the Tools --> Server Info screen)

SMTP Server EHLO / HELO Name linux.ivd.com.au

SMTP Server Port Number 25

SMTP Authentication Required false

SMTP Authentication Username sales (mailbox name)

SMTP Authentication Password XXXXXXXXXX (mailbox password)

 

thanks!

Link to comment
Share on other sites

PROBLEM:

-when a customer creates an account, they get an Internal Server 500 error, but the data was inserted into the database.

-if you try to use the email function in the admin CP, you will also get this same 500 error.

 

CAUSE:

-these both fail due to the email function called and the way your server is configured.

 

EVIDENCE:

-if you look in your server logs (eg. /var/log/httpd/error_log ) it shows:

 

"malformed header from script. Bad header=/home/siteadmin/dead.letter"

 

Looking in the /home/siteadmin/dead.letter file will reveal what address is failing. You will find that addresses not on your server will fail. So if you did like me and created a test account with the address the same as the server you won't see the problem. I only noticed the log entry as I was 'trailing' it on ssh as I was configuring it and noticed the error and that a new customer was created which created it.

 

SOLUTION:

if you look in the php manual (http://www.php.net/manual/en/function.mail.php ) it says:

Description

bool mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )

 

Sends an email.

 

additional_parameters (optional)

 

The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.

 

The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.

 

The additional_parameters parameter is disabled in safe_mode and the mail() function will expose a warning message and return FALSE when used.

 

so what I did was add the '5th parameter' to the mail function (i had to deal with this with another emailing program that added a 'bounce' mechanism for returned emails), and set safe_mode OFF (it already was).

 

This contribution had the right idea, but totally incorrect code changes. http://addons.oscommerce.com/info/5007

 

EDIT : /classes/email.php (07/03/2007 osCommerce Online Merchant 2.2 RC1)

 

FIND:

 

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));

 

REPLACE WITH:

 

$params = "-f$from_addr";

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers), $params);

 

 

I feel the way the catalog handles the 500 error is poor. I also feel this is a HUGE issue for newbies who don't understand php, mail(), and server configuration (especially in a virtually shared environment). You may find a lot of people creating accounts but no orders placed. If the user happens to get around the first 500 error during create account, they will hit it again when they finalize the order as it would then send an order email (anytime the system emails it will fail for emails not on the server ie your customers).

 

ALSO:

 

for those who have access tot heir php.ini files, you can try altering the sendmail_from path directly. '[email protected]' can be your 'from' address of the store, or an actual mail account that is only 'seen' if an email bounces. Your customers won't actually see the bounce address in the mails they receive.

 

 

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").

sendmail_path = "/usr/sbin/sendmail -t -i -F [email protected] -f [email protected]"

Link to comment
Share on other sites

Actually...(can't figure out how to edit the previous post)

 

EDIT :

 

/admin/includes/classes/email.php

/includes/classes/email.php

 

FIND:

 

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));

 

REPLACE WITH:

 

$params = "-f$from";

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers), $params);

 

 

I found on my server that the original EDIT worked only for sending emails through the ADMIN area because it formed the 'from_addr' as "STORE OWNER" <STOREOWNEREMAIL> but the create_account and password_forgotten pages only formed it by the email address so I'd get the mail returned with "Relaying denied. Proper authentication required"

 

If you use $from it will be correctly formed either way.

Link to comment
Share on other sites

why smtp ?

Oscommerce runs on Linux ??

So I would of thought sendmail

 

 

I installed the contribution and still doesnt work. My site has been working finr for 2yrs, then this past monday it stopped. I finally got to a tech guy on my hosting company and he said they updated an apache server. So I know it has to do with that, but thats about all I can find out so far.

Link to comment
Share on other sites

Hi,

 

I installed the SMTP Authenication Contribution and entered the server info and my send email is set to true. When I create a new login, a confirmation email is successfully sent to my test email address. However, when I use "Send Mail" in Admin -> Tools to send an email to the same test email address, it doesn't work. It appears to work in the Admin tool, but I never receive it. Anyone else run in to this? Any help is greatly appreciated.

 

Dave

Link to comment
Share on other sites

Alrgiht.

I did the email_test.php and I got the PHP email. I am not getting the email through oscommerce.

 

Operating System Linux

Apache Version 1.3.33 (Unix)

Perl Version 5.8.0

PHP Version 4.3.11

MySQL Version 4.0.27-standard

Path to Perl /usr/bin/perl

Path to Sendmail /usr/sbin/sendmail

 

 

Anyone have any ideas here? All my settings are set correctly. I'm sending to a gmail account, using sendmail.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...