简体   繁体   中英

Swift_TransportException on sending email

Cant send email on registration (NOte: I m using Ubuntu) here is my.env config

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=cxx2ca6xxxx
MAIL_PASSWORD=44dd3xx402fae
MAIL_ENCRYPTION=ssl

i have also run these commands Php artisan cache:clear php artisan config:clear

Swift_TransportException {#1578 ▼
  #message: "Connection could not be established with host  [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]"
  #code: 0
  #file: "/var/www/html/theBowlOne-FleetCart/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php"
  #line: 269
  trace: {▶}
}

Problem was solved there.the smtp settings was coming from database not from.env file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM