I'm having trouble executing the email trigger via PHPMailer, the following error is being generated: Mailer Error: Message body empty
Follow my code:
<?php
require 'PHPMailer/class.smtp.php';
require 'PHPMailer/class.phpmailer.php';
$Mailer = new PHPMailer;
$Mailer->isSMTP();
$Mailer->isHTML(true);
$Mailer->CharSet = "UTF-8";
$Mailer->SMTPAuth = true;
$Mailer->SMTPDebug = 3;
$Mailer->SMTPSecure = "ssl";
$Mailer->Host = "meu.host.com";
$Mailer->Username = "[email protected]";
$Mailer->Password = "minha_senha_do_email";
$Mailer->Port = 587;
$Mailer->FormName = "ffffffff";
$Mailer->Form = "[email protected]";
$Mailer->addAddress("[email protected]");
$Mailer->Subject = "dddddddd";
$Mailer->body = "fffffffffffffffffffffff";
if (!$Mailer->send()) {
echo "Mailer Error: " . $Mailer->ErrorInfo;
} else {
echo "Message sent!";
}
?>