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

A place to discuss and receive support for the Web Auction application.

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

Postby jaspern89 » Fri Mar 26, 2010 7:41 am

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
jaspern89
 
Posts: 11
Joined: Wed Mar 17, 2010 5:54 am

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

Postby shannah » Fri Mar 26, 2010 5:22 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

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

Postby jaspern89 » Wed Mar 31, 2010 12:38 am

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
jaspern89
 
Posts: 11
Joined: Wed Mar 17, 2010 5:54 am


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved