linux - Laravel - Connection could not be established with host smtp.gmail.com -


i've tried possible solutions available here in stackoverflow, nothing... think problem related firewall, can send mail using smtp gmail on local machine, not in server, following message:

connection not established host smtp.gmail.com [connection timed out #110]

i've tried following commands:

ufw allow 587/tcp

iptables -i output -p tcp --dport 587 -j drop

iptables -i output -d smtp.gmail.com -p tcp -m tcp --dport 587 -j accept

iptables -l output -n

however not worked...

this .env email settings:

mail_driver=smtp mail_host=smtp.gmail.com mail_port=587 mail_username=*****@gmail.com mail_password=***** mail_encryption=tls 

my controller sending emails:

public function postemail(postemailrequest $request) {     if ($request){         mail::send('app.pages.contato.email', $request->all(), function($message) use ($request)         {             $message->from($request->email , config('settings.website_title'));             $message->to(config('settings.admin_email'))->subject($request->assunto);         });          return redirect('contato');     }else{         return redirect('contato')->witherrors($request);     } } 

i sent ticket digital ocean , obtained answer:

hello!

to curb recent increase in abuse , spam, have initial smtp block on new accounts created in contexts.

to remove block we'd manual account verification.

please let know following:

  • your name
  • location
  • phone number
  • the reason requesting removal of smtp block

also, please provide many of following can verify identity:

  • your public twitter handle
  • your blog
  • your company or personal website
  • your public facebook profile

we take spam comply can-spam act. if you're not familiar, says may not send bulk email unless maintain double-authorized list of subscribed members including ip addresses , relevant contact information. also, must follow guidelines including removal links sent emails according can-spam act.

if have questions we're happy answer them you.

regards, digitalocean support

edit


i replied information requested , works =)


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -