My outgoing mail is being blocked by certain mail servers with the following error:
<[email protected]>: host mail.abuseat.org[54.93.50.35] said: 550 *** The
HELO for IP address 139.180.168.140 was 'localhost.localdomain' (invalid
syntax) *** (in reply to RCPT TO command)
It appears that to resolve this, I have to "correct your HELO localhost.localdomain and if needed, configure your mail server with correct DNS (forward and reverse) and HELO/EHLO values".
My mail server is on my plesk server and I'm using phpmailer to send mail.
The code that I use to send mail (edited for privacy and simplicy reasons) is:
Can I get some advice on areas that I should look for to 'fix' this problem.
<[email protected]>: host mail.abuseat.org[54.93.50.35] said: 550 *** The
HELO for IP address 139.180.168.140 was 'localhost.localdomain' (invalid
syntax) *** (in reply to RCPT TO command)
It appears that to resolve this, I have to "correct your HELO localhost.localdomain and if needed, configure your mail server with correct DNS (forward and reverse) and HELO/EHLO values".
My mail server is on my plesk server and I'm using phpmailer to send mail.
The code that I use to send mail (edited for privacy and simplicy reasons) is:
PHP:
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
$mail = new PHPMailer(true);
//Server settings
$mail->SMTPDebug = 0;
$mail->isSMTP();
$mail->Host = 'mydomain.com';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = '***************';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
//Recipients
$mail->setFrom([email protected], 'My company');
$mail->addAddress([email protected]);
$mail->addCC($cc_email);
$mail->addReplyTo([email protected], 'do not reply');
// Content
$mail->isHTML(true);
$mail->Subject = 'subject';
$mail->Body = 'message';
$mail->AltBody = 'message';
$mail->send();
Can I get some advice on areas that I should look for to 'fix' this problem.