Laravel - Connection Could Not Be Established With Host

- 1 answer

I've tried all the possible solutions available here in stackoverflow, however nothing... I think the problem is related to the firewall, I can send mail using SMTP gmail on my local machine, but not in my server, I get the following message:

Connection could not be established with host [Connection timed out #110]

I've tried the following commands:

ufw allow 587/tcp

iptables -I OUTPUT -p tcp --dport 587 -j DROP

iptables -I OUTPUT -d -p tcp -m tcp --dport 587 -j ACCEPT

iptables -L OUTPUT -n

However not worked...

This is my .env email settings:


My controller for sending emails:

public function postEmail(PostEmailRequest $request)
    if ($request){
        Mail::send('', $request->all(), function($message) use ($request)
            $message->from($request->email , config('settings.website_title'));

        return redirect('contato');
        return redirect('contato')->withErrors($request);


I sent a ticket to Digital ocean and that is the obtained answer:


To curb a recent increase in abuse and SPAM, we have an initial SMTP block on new accounts created in certain contexts.

To remove that block we'd like to do some manual account verification.

Please let us know the following:

  • Your Name
  • Location
  • Phone Number
  • The reason you are requesting the removal of the SMTP block

Also, please provide as many of the following as you can to help us verify your identity:

  • Your public Twitter handle
  • Your blog
  • Your company or personal website
  • Your public Facebook profile

We take SPAM very seriously as we comply fully with the CAN-SPAM Act. If you're not familiar, this says that you may not send bulk email unless you maintain a double-authorized list of subscribed members including IP addresses and relevant contact information. Also, you must follow guidelines for including removal links with all sent emails according to the CAN-SPAM Act.

If you have any questions we're happy to help answer them for you.

Regards, DigitalOcean Support


I replied with the information that was requested and now everything works perfectly =)