Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

THe mail doesn't work


bongo

Recommended Posts

Posted

Hi,

 

I have some problems with the site and sending mail. I have figured out that it is the hosting company.

 

But i cant find out which file that is the sending fil for mails.

 

Sorry for my bad english.

 

Hope somebody can help me.

 

Regards

Thomas

Posted

Hi,

 

From phpXRef:

 

Function and Method Cross Reference

tep_mail()

Defined at:

 

* /admin/includes/functions/general.php -> line 1069

* /includes/functions/general.php -> line 959

 

Referenced 10 times:

 

* /checkout_process.php -> line 258

* /checkout_process.php -> line 262

* /contact_us.php -> line 24

* /create_account.php -> line 246

* /password_forgotten.php -> line 29

* /tell_a_friend.php -> line 80

* /includes/modules/payment/cc.php -> line 172

* /includes/functions/general.php -> line 959

* /admin/orders.php -> line 52

* /admin/includes/functions/general.php -> line 1069

 

It is the tep_mail() function that is called for emails. What is the problem you are having ?

 

Peter

  • 2 months later...
Posted

I am having the same problem. No email is sent from any function on the site.

 

This is a re-build of a previously static site, which in the past, I used a perl/cgi sendmail script.

 

My site is hosted on a solaris server, and I am not sure how to properly configure the settings so that mail is properly handled. Any clues on this would be of great help..

Posted

Hi ALL.

 

I have the same problem. And i seems to know what is it.

 

Before the email was not send from admin -> tools. It was because mail server not configured properly and mail was sent without right return-path.

Read my post here.

http://www.oscommerce.com/forums/index.php?showtopic=134948&hl=

I have changed it by adding simple parameter to PHP mail function.

 

Now i found that another "welcome messages" also not sending.

I think it's old problem. I found tep_mail function in the general.php file but i dont know how to add the same change as in the email.php since actually i dont know PHP.

 

I think i must change something in this line

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

 

or to change the whole line to somethin like this :

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

 

I dont know how to do this right, PHP GURU YOU CAN HELP! :blink:

Posted
Hi,

 

Test whether you are able to do a PHP mail(), like this:

 

<?php
$message = 'some text';
mail('[email protected]', 'test', $message);
?>

 

Peter

 

Hi Peter,

Unfortunately it doesn't seem to be working. I basically just created page "mailtest.php" with only that script above in (of course substituting relevant info.) and then uploaded it into my top level directory (outside of osc). I then called the page...Even refreshed a couple of times....And nothing in my email Inbox :(

 

What next?

  • 2 months later...
Posted

Hi!

 

I had a problem sending emaisl, To solve it only took a couple of replaces. What I did is the following:

 

1.- Download using ftp the following files:

 

your_Oscommerce_Directory/admin/includes/classes/email.php

and

your_Oscommerce_Directory/includes/classes/email.php

 

I recommend before modifying to make a backup copy of the files you change.

 

2.- Find the following lines in both files (they are near the end of the file):

 

if (EMAIL_TRANSPORT == 'smtp') {

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

} else {

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

}

 

3.- To fix it you must add: ,"-f" . $from_addr at the end, or well replace the lines jus mentioned in step 2 for this:

 

if (EMAIL_TRANSPORT == 'smtp') {

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

} else {

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

}

 

4.- Save the files with the changes.

 

5.- Upload the files and replace for the old files.

 

I found this in another solution in the forum, don't remember wich, but it worked for me, I couldn't send mails to some email accounts.

 

Hope it Helps!!

 

Regards

Alejandro

Archived

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

×
×
  • Create New...