Reply to php script behaves differently when it run in command line

Your name:

Reply:


Posted by rchen8080 on 04/04/07 02:21

I found that the php script behaves differently when it run in command
line rather than runing over web server.

Program includes the code like

<?php

function send_email($from_address, $to_address, $bcc_address,
$subject, $msg, $attachments,$reminder_id) {
$headers = ...;
....
mail($to_address, $subject, $msg, $headers);
...
}

#main body of code here to grap info from database and call
send_mail() function here
...
send_email($newarry[FROM_ADDRESS], $newarry[TO_ADDRESS], $newarry
[BCC_ADDRESS], $newarry[SUBJECT], $newarry[BODY],$attachments,
$newarry[ID]);

?>
I can not use lynx since it doesn't support https on my machine.
The values are from database and feed in send_mail() function which
will form the body message and header and pass to php mail()
function. The problem is that "mail($to_address, $subject, $msg,
$headers)" can not access the values passed over to it when i use
'php' command to run the script. But I can use 'print' to print out
all the values but mail()function just can't get them.
However, this program works fine when I use broswer to access it.

Any help will be greatly appreciated.


Runner

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация