|
|
 |
Re: FN-FORUM: PHP email header
date posted 1st March 2008 11:06
On 01/03/2008 12:06, Punters Power wrote:
> I'm using the mal function PHP and it's screwed in some way. for some
> reason it is not detecting the html / text headers
>
> any ideas?
>
> Andrew
>
>
Don't use the mail function in php, it's terrible and if not used
correctly open to abuse by spammers, and you also have to go through all
the hassle of setting up headers and stuff.
I use phpmailer, easy to use and creates the headers for you:
$mail = new PHPMailer();
$mail->Mailer = "smtp";
$mail->From = $fromemail;
$mail->FromName = $fromname;
$mail->Subject = $subject;
$mail->AddAddress($toemailadddress);
$mail->Body = $messagehtml;
$mail->AltBody = $messagetext;
$mail->Send();
Martin
|
 |
|