PHP SMTP Email Sender
Send your emails easily !
php-smtp-email-sender.php
<?php
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->CharSet="UTF-8";
$mail->SMTPSecure = 'tls';
$mail->Host = 'smtp.your-server.com';
$mail->Port = 25;
$mail->Username = 'your-email@email.com';
$mail->Password = 'your-password';
$mail->SMTPAuth = true;
$mail->From = 'your-email@email.com';
$mail->FromName = 'your name';
$mail->AddAddress('destinataire@exemple.com');
$mail->AddReplyTo('your-email@email.com', 'your name');
$mail->IsHTML(true);
$mail->Subject = "PHPMailer Test Subject via Sendmail, basic";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$mail->Body = "Hello<br><br><p style='color:red;'>This is a test !</p>";
if(!$mail->Send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message sent!";
}
?>