Advertisement
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: |
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "192.168.16.2"; // SMTP server
$mail->From = "matt@cowleyit.co.uk";
$mail->AddAddress("$to");
$mail->Subject = "Autoskills txt";
$mail->Body = $body;
if(!$mail->Send())
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Message has been sent.';
}
|
|
Loading Advertisement... |