I am trying to implement SendGrid SMTP integration with snipe-it . I am testing out both applications on a vmware player with centos7 . i have successfully setup snipe-it and now trying to test sending of emails so i tried SendGrid SMTP .
In my snipe it .env file i have :
MAIL_DRIVER=smtp MAIL_HOST=smtp.sendgrid.net MAIL_PORT=25 //i tried 587 and 2525 as well , all ports are opened MAIL_USERNAME= sendgridusername //i tried base64 encoded apikey MAIL_PASSWORD = sendgridpassword //i tried base64 encoded genarate api key ....
However i can do the telnet test to smtp.sendgrid.net with success authentication and sending of email ( on sendgrid account , it says email is processed and delivered but i don't receive the email ) , as refer to https://sendgrid.com/docs/API_Reference/SMTP_API/getting_started_smtp.html#--Sending-a-test-SMTP-email-with-Telnet
However on my web application ( using apache virtual host on centos7 running on localhost ) tries to send a email i get the following error :
(1/1) Swift_TransportException Connection could not be established with host smtp.sendgrid.net [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]