Page 1 of 1

Get an error when trying to send mail to bidders..

PostPosted: Fri Mar 26, 2010 7:41 am
by jaspern89
This is the error mail I get when I try to bid on items and it only happens when I have enabled the option to send outbid mail to users, but Admin notification for users outbids works without any problems.

The error is:
Code: Select all
Warning: mail() [function.mail]: SMTP server response: 503 Bad command sequence in C:\Documents and Settings\Jaspreet\My Documents\xampp\htdocs\jotronpcauction\include\functions.inc.php on line 188

Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\Jaspreet\My Documents\xampp\htdocs\jotronpcauction\include\functions.inc.php:188) in C:\Documents and Settings\Jaspreet\My Documents\xampp\htdocs\jotronpcauction\actions\bid.php on line 26



Line 188 in Functions.inc.php is:

Code: Select all
$res = mail(getConf($mail), $app->_conf['title'].': You have been outbid on an auction item.', $msg, $mail_headers);


Line 26 in bid.php is:

Code: Select all
header("Location: ".$url);


Can you think of what I have done wrong?
We need to get this Web Auction setup ASAP!


Thanks for every comment/help
- Jaspern

Re: Get an error when trying to send mail to bidders..

PostPosted: Fri Mar 26, 2010 5:22 pm
by shannah
Hmm... good question. It is hard to say exactly what is happening, BUT i'd lay my money on the $mail_headers giving windows problems. (I see that you're using Windows and WebAuction is primarily developed on linux).

Could be line endings in the $mail_headers that are tripping it up. Perhaps try changing the line endings in these headers to windows line endings "\r\n" instead of the unix ones that it is currently using "\n".

-Steve

Re: Get an error when trying to send mail to bidders..

PostPosted: Wed Mar 31, 2010 12:38 am
by jaspern89
shannah wrote:Hmm... good question. It is hard to say exactly what is happening, BUT i'd lay my money on the $mail_headers giving windows problems. (I see that you're using Windows and WebAuction is primarily developed on linux).

Could be line endings in the $mail_headers that are tripping it up. Perhaps try changing the line endings in these headers to windows line endings "\r\n" instead of the unix ones that it is currently using "\n".

-Steve
Problem is now solved. I got it fixed by moving line 188 one level up so it is now line 187 and every other lines is also one level up now. I saw that "\r\n" was in the functions.php.inc from before, so finally the site is up and running and users get outbid notification by mail.
Strange thing though that just moving line 187 and everything further down up one line fixed this issue.

Thanks for all help
Jaspern