Mauricio Asenjo wrote:
>
> For sending mail with custom headers, I modified a phpmailer
> class for php to do that , maybe it can be used in cgi mode
> on a shell script.
I don't think the OP would want to run a PHP script in CGI mode since
PHP can be used directly for scripting. On Debian systems it's in the
php4-cli and/or php5-cli packages (other distros may have similar
packages). If building PHP from scratch, simply pass --enable-cli to
the configure script. For more info on command-line PHP, see:
http://www.php.net/manual/en/features.commandline.php
Moreover, with PHP there's no need for a modified phpmailer class to
send extra headers. The prototype for the PHP mail() function is:
bool mail ( string to, string subject, string message [, string
additional_headers [, string additional_parameters]] )
Notice that the optional fourth parameter allows one to easily set extra
headers.
http://www.php.net/manual/en/function.mail.php
Depending on the OP's needs, he could either write a simple PHP script
to just do the mailing or redo the entire existing shell script in PHP.