Patrick Kellum wrote:
> I sent a patch to John Finlay that added not only SMTP, but also
> sendmail and PHP's mail system. Hopefully it will be added to an
> upcoming release.
hunh? php mail() function was already in there... john has wrapped it with the pgvMail routing in functions.php...
//-- this function is a wrapper to the php mail() function so that we can change settings globally
// for more info on format="flowed" see: http://www.joeclark.org/ffaq.html
// for deatiled info on MIME (RFC 1521) email see: http://www.freesoft.org/CIE/RFC/1521/index.htm
function pgvMail($to, $subject, $message, $extraHeaders){
global $pgv_lang, $CHARACTER_SET, $LANGUAGE, $PGV_STORE_MESSAGES, $TEXT_DIRECTION;
// wkitty42 - 2005-02-25 - added new var $USE_SMTP as global var for smtp or mail() determination.
// also need $PGV_BASE_DIRECTORY to load smtp.php from
global $USE_SMTP, $PGV_BASE_DIRECTORY;
that is the top with my changes... here is the bottom with my changes...
$htmlMessage .= "\r\n\r\n\r\n\r\n--$boundry--";
$message = $htmlMessage;
}
// wkitty42 - 2005-02-25 - determine if we use smtp to send mail or not.
// check result code! do not assume that it worked!
if ($USE_SMTP) {
if ( !defined('SMTP_INCLUDED') )
{
include($PGV_BASE_DIRECTORY . 'smtp.php');
}
$result = smtpmail($to, hex4email($subject,$CHARACTER_SET), $message, $extraHeaders);
}
else {
$result = @mail($to, hex4email($subject,$CHARACTER_SET), $message, $extraHeaders);
}
// Did it work?
if (!$result)
{
message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($USE_SMTP) ? 'SMTP' : 'PHP') . ' :: ' . $result, '',
__LINE__, __FILE__);
}
else {
print "Email ".$pgv_lang["message_sent"]." - ".$to."<br />\n";
}
}
and then i added a slightly modified phpBB2 SMTP.PHP and somewhere i remember doing something with message_die but don't
have the time, ATM, to locate that... i really should compare all the files and see what i changed where, i guess...
i'm not sure i understand the addition of sendmail, either... php.ini carries the settings for the mail() function and
it can easily call sendmail... in fact, that's what it defaults to ;)
--
_\/
(@@) Waldo Kitty, Waldo's Place USA
__ooO_( )_Ooo_____________________ telnet://bbs.wpusa.dynip.com
_|_____|_____|_____|_____|_____|_____ http://www.wpusa.dynip.com
____|_____|_____|_____|_____|_____|_____ ftp://ftp.wpusa.dynip.com
_|_Eat_SPAM_to_email_me!_YUM!__|_____|_____ wkitty42 -at- alltel.net
|