mailcheck - Money max

mailcheck




Send email via Gmail SMTP server in PHP


Send email via Gmail SMTP server in PHP

Gmail SMTP








isSMTP();
$mail->Host = ‘smtp.gmail.com’;
$mail->Port = 587;
$mail->SMTPSecure = ‘tls’;
$mail->SMTPAuth = true;
$mail->Username = $email;
$mail->Password = $password;
$mail->addAddress($to_id);
$mail->Subject = $subject;
$mail->msgHTML($message);
if (!$mail->send()) {
$error = “Mailer Error: ” . $mail->ErrorInfo;
echo ‘

‘.$error.’

‘;
}
else {
echo ‘

Message sent!

‘;
}
}
else{
echo ‘

Please enter valid data

‘;
}
?>