SMTP :: boolean addheader ( string name, string value )

Returns TRUE if has been successfully added, FALSE if not. The most important values of header (see the list) can not be set, because XPM2 build this values automatically or you can use another function to set (like: AddTo(), From()). This values of header can not be set: Subject, From, To, Cc, Bcc, Date, Content-Type, Content-Transfer-Encoding, Content-Disposition, X-Mailer, X-Priority, X-MSMail-Priority, MIME-Version Notice: you can add multiple header values with the same name. Example:

$mail = new SMTP;

$hadd = $mail->AddHeader('X-Whatever', 'the value');

echo $hadd ? 'added' : 'error';

[ Comments ] Last update: Friday, June 16, 2006