I'm using PHPMailer, my website is hosted in a DigitalOcean server and I already requested them to remove, this is their response:
Thanks for providing that extra bit of information. I have enabled mail-related IPv4 traffic for your account.
But when I try to send e-mail, it keeps showing me this error:
This is my PHP code:
- public static function sendEmail($email,$title,$body){
- require_once __DIR__ . "/../library/PHPMailer/PHPMailerAutoload.php";
-
- $mail = new PHPMailer;
-
- $mail->SMTPDebug = 3;
-
- $mail->isSMTP();
- $mail->Host = 'smtp.zoho.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'acimar@agiliza.me';
- $mail->Password = 'mypassword';
- $mail->SMTPSecure = 'ssl';
- $mail->Port = 465;
-
- $mail->setFrom('acimar@agiliza.me', 'Agiliza.me');
- $mail->addAddress($email);
- //$mail->addReplyTo('info@example.com', 'Information');
- $mail->isHTML(true);
- $mail->CharSet = "UTF-8";
-
- $mail->Subject = 'Here is the subject';
- $mail->Body = $body;
-
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
- }