Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Not sending e-mails


iturtev

Recommended Posts

Hi,

I am posting this problem in new thread, because the other is with different name. I have osCommerce v2.2 RC2, fresh installation with STS 4.5.8 and Bulgarian langugage. I have only one test product. The problem is that when I place an order it dont send e-mail to the admin or to the customer. Also when I try the contact us page - there is the same problem. I have setup an e-mail in the configurations->my shop, Send Extra Order Emails To, the method I am using is sendmail (but I already tried smtp), Send e-mails is yes, E-Mail Linefeeds -> LF, Verify E-Mail Addresses Through DNS -> true (dont work with false too).

 

I hope somebody can help me, because I want to start the shop ASAP.

Link to comment
Share on other sites

Getting email to work can be a lot of fun...On the plus side, nothing is working on your site, so once we get you properly configured for your hosting company, it should all work.

 

I assume you are hosted on a linux based server since you have selected sendmail as the email protocol. You have the email linefeed parameter (LF) correctly configured for sendmail.

 

Have you tried the email_test.php found here?

 

Ben

Link to comment
Share on other sites

It's down to the formatting of one of your email related configuration parameters...

 

In admin-> configuration -> my store:

 

"Store Owner" parameter is straight text (no quotes, spaces are OK) like: Firstname Lastname

"E-mail Address" parameter is a bare internet style address (no quotes or <> characters) like : [email protected]

"E-mail From" parameter is a bare internet style address (no quotes or <> characters) like : [email protected]

 

"Send Extra Order Emails to" parameter must be formatted as (no quotes; comma separated): Name 1 <email@address1>, Name 2 <email@address2>

 

The "Store Owner" and "E-mail Address" parameters are used together to address message sent to the store (like those sent using the contract us page).

 

The "E-mail From" parameter is used as the from address in emails sent by the store to the customer. By the way, I'm not completely sure the from address has to be a bare internet style address. I know that works. I need to look at the code to see what else would work.

 

Ben

Link to comment
Share on other sites

I'm having the same difficulty.

But I use a local smtp server with autentication activated.

 

phpbb forum I was able to setup and make it send through the smtp server.

however osc is not going there...

using the admin -> tools -> send mail

i try and it says that sended successfully... but smtp server does not register connection and no mail is sent :(

 

any ideas ?

is it possible to have autentication setup in osc ?

i already looked in the contribs... but I haven't found it...

 

Cheers

Link to comment
Share on other sites

I'm having the same difficulty.

But I use a local smtp server with autentication activated.

 

phpbb forum I was able to setup and make it send through the smtp server.

however osc is not going there...

using the admin -> tools -> send mail

i try and it says that sended successfully... but smtp server does not register connection and no mail is sent :(

 

any ideas ?

is it possible to have autentication setup in osc ?

i already looked in the contribs... but I haven't found it...

 

Cheers

The osCommerce code always reports success; the high level code never checks the status of the low level send function.

 

The answer to your question is easy...here is the link to the SMTP Authentication contribution.

 

Ben

Link to comment
Share on other sites

Hi bpopelar,

I did all of this, but it didn't work... any another ideas ?

 

P.S. I didn't change the source

OK, I'm stumped...it should be working given: 1) email_test worked, 2) the email parameters are formatted correctly, and 3) you haven't changed any code.

 

If you hosting company supports SMTP, load this contribution. It has some debug logic built into it that will tell us what is happening.

 

Ben

Link to comment
Share on other sites

The osCommerce code always reports success; the high level code never checks the status of the low level send function.

 

The answer to your question is easy...here is the link to the SMTP Authentication contribution.

 

Ben

 

thanks... i'll try that and hoppefully it will work :thumbsup:

Link to comment
Share on other sites

My hosting provider supports smtp and the email_test works both with sendmail and smtp.

Load the contribution I referenced above. I need to see the output from the debug logic to figure out what is wrong with your configuration parameters. Load the contribution and follow the README instructions to enable the debug feature. Send me the output via a private message (do not post the output to this topic).

 

Ben

Link to comment
Share on other sites

Ok, I installed it and now waiting for my hosting provider to give username, password, mail server address ...

This is for the configuration of the contribution. But when I ran email_test it works with smtp too and I haven't make configuration for it.

Link to comment
Share on other sites

Ok, I installed it and now waiting for my hosting provider to give username, password, mail server address ...

This is for the configuration of the contribution. But when I ran email_test it works with smtp too and I haven't make configuration for it.

The email_test sends a message based on the following parameters:

 

SMTP

smtp_port

 

You can look in admin -> Tools -> Server Info to find the definition of these parameters. Look in the PHP Core section of the page.

 

You may not need the Authenication username / password since email_test works. Set the SMTP Authenication Required parameter to False initially and try sending an email while you are waiting for the info from your hosting company.

 

Ben

Link to comment
Share on other sites

I get a replay from my hosting provider and they said that they no longer provide smtp. But how email_test worked ?

I don't know what to tell you...

 

The email_test sends an email by 1) directly calling the PHP mail() function; and by 2) calling the osCommerce tep_mail() function which utimately calls the PHP mail() function. The PHP mail() function calls the sendmail program or a sendmail wrapper (defined via the PHP Core parameter sendmail_path). Sendmail (or the wrapper interface) sends the email message via SMTP to the destination (your hosting company's reply doesn't make sense).

 

The contribution I had you load does not utilize the PHP mail() function, and talks directly to an SMTP server.

 

I don't know how to debug the sendmail protocol without looking into the system log files. You might have to work with you hosting company to figure out what is wrong (i.e., send a message using osCommerce and note the time you sent it; call the technical support number and have them look into the system log file and tell you what it doesn't like).

 

Ben

Link to comment
Share on other sites

I call them with my problem and said that there is no problem with their servers - the problem must be in osCommerce. I don't know what to do. This is a temporary hosting provider. After I finish the shop I will change the provider and I hope that it will helps.

 

P.S. If it can help I can send you via PM email.php class file, contact us or any file that you think can be a problem.

Link to comment
Share on other sites

The osCommerce code always reports success; the high level code never checks the status of the low level send function.

 

The answer to your question is easy...here is the link to the SMTP Authentication contribution.

 

Ben

 

 

thanks very much bpopelar ...

i've tried and it worked without difficulties...

:thumbsup:

 

problem solved in my case ;)

Link to comment
Share on other sites

I call them with my problem and said that there is no problem with their servers - the problem must be in osCommerce. I don't know what to do. This is a temporary hosting provider. After I finish the shop I will change the provider and I hope that it will helps.

 

P.S. If it can help I can send you via PM email.php class file, contact us or any file that you think can be a problem.

If you haven't modified the code, there is no reason to send it to me. What version of osCommerce did you start with? When did you download it or did you start with a template that you purchased?

 

Ben

Link to comment
Share on other sites

I started with osCommerce v2.2 RC2. I haven't purchased a template. I installed STS 4.5.8 and use my template, but it is only HTML&CSS.

OK, you have a fairly up to date version of the code...

 

If you don't mind, send me via PM your:

 

My Store parameters

E-Mail Options parameters

Tools -> Server Info -> PHP Core section parameters

 

Ben

Link to comment
Share on other sites

is Your send email set to true.

 

If so what email smtp or send mail.

 

If smtp chek your settings and ask hosting.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Hi,

I am posting this problem in new thread, because the other is with different name. I have osCommerce v2.2 RC2, fresh installation with STS 4.5.8 and Bulgarian langugage. I have only one test product. The problem is that when I place an order it dont send e-mail to the admin or to the customer. Also when I try the contact us page - there is the same problem. I have setup an e-mail in the configurations->my shop, Send Extra Order Emails To, the method I am using is sendmail (but I already tried smtp), Send e-mails is yes, E-Mail Linefeeds -> LF, Verify E-Mail Addresses Through DNS -> true (dont work with false too).

 

I hope somebody can help me, because I want to start the shop ASAP.

Have you added any contributions that changed the code in chechout_process.php file?

Link to comment
Share on other sites

  • 2 months later...

No, I haven't add any contribs that change the code in chechout_process.php. I have only two contrib that I add - STS Temaplate System and a contrib for importing excel files. anything else.

Link to comment
Share on other sites

  • 2 months later...

Ivan,

 

My OSCommerce emails were getting filtered by most ISPs that did filtering. I found that they were getting blocked because the headers said they were from apache@localhost. I corrected this by adding a 'from' address in the headers position for PHP mail. If this arg is empty apache sets from to apache and they were getting blocked.

 

I added a 6th arg to the mail in /functions/general.php around line 1021:

 

OLD:

// Send message

$message->build_message();

$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);

 

NEW:

// Send message

$message->build_message();

$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $from_email_address);

 

 

Jeff

 

 

 

No, I haven't add any contribs that change the code in chechout_process.php. I have only two contrib that I add - STS Temaplate System and a contrib for importing excel files. anything else.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...