Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC email not working with SMTP


outsourcethis

Recommended Posts

I have OSC installed on awindows 2003 server. SMTP is working correctly.

I can't send emails from OSC though me SMTP server.

I have tried every trick/mod posted here in the forums. There must be a simple solution to this problem.

 

I have no auth needed to use smtp server. I have configed my email transport in the admin to SMTP, and send emails is set to true

 

There must be a email file in OSC that you set the SMTP IP address in but I can't find it. There must be a file that connects the third party SMTP server to OSC

 

Yes I have my ini.php file setup for SMTP also

 

 

Anyone have any ideas

 

Thanks

Link to comment
Share on other sites

I have OSC installed on awindows 2003 server. SMTP is working correctly.

I can't send emails from OSC though me SMTP server.

I have tried every trick/mod posted here in the forums. There must be a simple solution to this problem.

 

I have no auth needed to use smtp server. I have configed my email transport in the admin to SMTP, and send emails is set to true

 

There must be a email file in OSC that you set the SMTP IP address in but I can't find it. There must be a file that connects the third party SMTP server to OSC

 

Yes I have my ini.php file setup for SMTP also

Anyone have any ideas

 

Thanks

[/quote

 

 

Go to windows subdirectory find php.ini far down is mail put your smtp and user name password that fix your problem with the mail that is how I fix my. PS: you can used the nopad program to edit the php.ini

Link to comment
Share on other sites

Yep saw your post in another thread....this did not work for me. I can't believe this product doesn't have a bullet proof easy way to setup SMPT mail through Windows 2003.....

 

any other ideas people...

 

Thanks for the suggestion

 

 

 

What version of PHP you are using? because the shopping cart read that info from it. very soon i going to put here my php.ini info so you see how I did it. I have my own windows 2003 server I run PHP 4.40 and mysql 4.1. Also in order to work you have to put your ISP smtp not the other ISP mail hosting for sample I have comcast as an ISP I get my mail from no-ip.com and I have to used comcast smtp not no-ip so the mail work

Link to comment
Share on other sites

What version of PHP you are using? because the shopping cart read that info from it. very soon i going to put here my php.ini info so you see how I did it. I have my own windows 2003 server I run PHP 4.40 and mysql 4.1. Also in order to work you have to put your ISP smtp not the other ISP mail hosting for sample I have comcast as an ISP I get my mail from no-ip.com and I have to used comcast smtp not no-ip so the mail work

 

 

here is the part that you have to edit on php.ini.

 

[mail function]

; For Win32 only.

SMTP = smtp.comcast.net ; for Win32 only

smtp_port = 25

sendmail_from= [email protected] ; for Win32 only

 

; For Win32 only.

;sendmail_from = [email protected]

 

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

;sendmail_path =

Link to comment
Share on other sites

Check your E-mail Linefeed setting in admin -> configuration -> E-mail Options.

 

It needs to be set to CRLF or many SMTP internet email forwarding agents will discard an email message.

Link to comment
Share on other sites

Got it working. So several things. I own the servers this is running on so I have complete control over SMTP, PHP.ini, etc. Turns out that in I had this setup

 

mail function]

; For Win32 only.

SMTP = severname ; for Win32 only

smtp_port = 25

sendmail_from= [email protected] ; for Win32 only

 

 

What I needed to add is "localhost"

 

and I also need to do this which I found on another board http://forums.creloaded.com/Forums/viewtop...il/start=0.html

 

 

"Found a solution!

 

This works for me:

 

look in email.php (there is one in catalog/includes/classes and one in catalog/admin/includes/classes)

 

Find this:

 

Code::

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 {

 

 

add this line in the white space BEFORE that:

 

Code::

ini_set("sendmail_from", "you@your_hosted_domain.com");

 

so that it looks like this:

 

Code::

ini_set("sendmail_from", "you@your_hosted_domain.com");

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 {

 

Of course, change you @ your_hosted_domain.com to your own reply address such as sales @ yourdomain.com!

 

This is why:

On a Windows based server it is necessary to set the "sendmail_from" address explicitly in the PHP.ini file. This will properly set the Return-Path variable in the header and is not necessarily the FROM address displayed on an email address. If the Return-Path is not specified, the email may be considered spam or malformed by most hosts. Especially on common free email servers. Since most hosts, including us, will not provide you with direct access to the PHP.ini file, you will need to set it in your script directly. Additionally, it would be incorrect for the host to specify a generic email address."

 

 

 

Doing both these things together fixed my problem.

 

Now works prefectly

Thanks

Guys

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...