我是一个相当初学者,我尽我所能,但我需要一些帮助。我有一个问题..
我有这段代码:
function prolancemail ( $recipient, $subject, $message, $mailformat = 'default' )
{
global $configuration, $current_version, $MAIL_CHARSET;
if ( $mailformat == 'default' )
{
$mailformat = $configuration['MAIL_FORMAT'];
}
if ( $mailformat == 'text/plain' )
{
$headers = 'From: ' . SITENAME . ' <' . $configuration['WEBMASTER_EMAIL'] . '>' . "\r\n" .
sprintf ( $MAIL_CHARSET, $mailformat );
}
elseif ( $mailformat == 'text/html' )
{
$headers = 'To: ' . $recipient . "\r\n" .
'From: ' . SITENAME . ' <' . $configuration['WEBMASTER_EMAIL'] . '>' . "\r\n" .
'X-Mailer: PHPProLance ' . $current_version . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
sprintf ( $MAIL_CHARSET, $mailformat );
}
if ( mail ( $recipient, $subject, $message, $headers ) )
{
return true;
}
else
{
return false;
}