Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send Email, not sure why??? #1502

Closed
asinan007 opened this issue Jul 20, 2018 · 7 comments
Closed

Unable to send Email, not sure why??? #1502

asinan007 opened this issue Jul 20, 2018 · 7 comments

Comments

@asinan007
Copy link

Hi,
I've been having this problem constantly every now and then. It says "blacklisted"/"blocked" but my service provider (hosting company) says its not blocked.
I have checked everything on my side and even on the scripting side. Below is the Error I receive, when i set $mail->SMTPDebug = 4.

2018-07-20 20:28:31 Connection: opening to ssl://box839.bluehost.com:465, timeout=300, options=array ()

2018-07-20 20:28:31 Connection: opened

2018-07-20 20:28:31 SMTP -> get_lines(): $data is ""

2018-07-20 20:28:31 SMTP -> get_lines(): $str is "550-Message rejected because [66.147.244.139]:16741 is blacklisted see Blocked"

2018-07-20 20:28:31 SMTP -> get_lines(): $data is "550-Message rejected because [66.147.244.139]:16741 is blacklisted see Blocked"

2018-07-20 20:28:31 SMTP -> get_lines(): $str is "550 - Too many failed logins"

2018-07-20 20:28:31 SERVER -> CLIENT: 550-Message rejected because [66.147.244.139]:16741 is blacklisted see Blocked550 - Too many failed logins

2018-07-20 20:28:31 CLIENT -> SERVER: EHLO www.cruise-maldives.com

2018-07-20 20:28:31 SMTP -> get_lines(): $data is ""

2018-07-20 20:28:31 SMTP -> get_lines(): $str is ""

2018-07-20 20:28:31 SERVER -> CLIENT:

2018-07-20 20:28:31 SMTP ERROR: EHLO command failed:

2018-07-20 20:28:31 SMTP NOTICE: EOF caught while checking if connected

2018-07-20 20:28:31 Connection: closed

SMTP Error: Could not authenticate.

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Below is my code;

`
//Create a new PHPMailer instance
$mail = new PHPMailer;

                $mail->isSMTP();
                $mail->SMTPDebug = 4;
                $mail->Host = 'box839.bluehost.com';
                $mail->SMTPAuth = true;
                $mail->Username = $senderEmail;
                $mail->Password = $sender_email_pass;
                $mail->SMTPSecure = 'ssl';
                $mail->Port = 465;

                //Set who the message is to be sent from
                $mail->setFrom($senderEmail, $senderName);
                //Set an alternative reply-to address
                $mail->addReplyTo($senderEmail, $senderName);
                //Set who the message is to be sent to
                $mail->addAddress($contact_email, $contact_name);
                //Set the subject line
                $mail->Subject = $emailSubject;
                $mail->isHTML(true);                                  // Set email format to HTML
                $mail->Body = $messageBodyToRequester;
                $mail->send();`

Need Help on this URGENTLY.

@Synchro
Copy link
Member

Synchro commented Jul 21, 2018

When it says:

Message rejected because [66.147.244.139]:16741 is blacklisted see Blocked

That means it's blacklisted & blocked. Your ISP is wrong, and it's nothing to do with your script.

It's common for this to happen on shared hosting; you can end up with an IP that was previously used by a spammer, and appears in blacklists Solution: don't use crappy cheap hosting..

@Synchro Synchro closed this as completed Jul 21, 2018
@asinan007
Copy link
Author

Yeah I can understand that, but i could send mail to the same add via outlook or gmail. and i could ping to box839.bluehost.com as well... i am not sure if that is suppose to happen or not if its blocked. So how do i check if the IP is blacklisted or blocked, so i can show to the hosts that its blocked. AND how long does it take this block to be removed.

@asinan007
Copy link
Author

i have checked if its blacklisted but it isn't on this
https://mxtoolbox.com/SuperTool.aspx?action=blacklist%3a66.147.244.139&run=toolpage

@asinan007
Copy link
Author

Also it doesn't happen on this particular IP only.

@Synchro
Copy link
Member

Synchro commented Jul 21, 2018 via email

@asinan007
Copy link
Author

asinan007 commented Jul 21, 2018

Also it worked well when i removed whole of this bunch
$mail->isSMTP(); $mail->SMTPDebug = 4; $mail->Host = 'box839.bluehost.com'; $mail->SMTPAuth = true; $mail->Username = $senderEmail; $mail->Password = $sender_email_pass; $mail->SMTPSecure = 'ssl'; $mail->Port = 465;

and replaced it with;
$mail->Host = 'mail.cruise-maldives.com';

And they still say its an scripting issue

@Synchro
Copy link
Member

Synchro commented Jul 21, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants