0

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
....

As refer to https://sendgrid.com/docs/API_Reference/SMTP_API/getting_started_smtp.html#--Sending-an-email-using-SMTP

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]
0

I just got this working on my snipe-it install. Use the following settings

MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=25 
MAIL_USERNAME= apikey 
MAIL_PASSWORD = <sendgrind api key>
  • Welcome to Stack Exchange.  It would appear that you have accidentally created two accounts. This will interfere with commenting and editing your own posts.  You should use the contact form and select “I need to merge user profiles” to have your accounts merged.  In order to merge them, you will need to provide links to the two accounts.  For your information, these are unix.stackexchange.com/users/316211/veeru and unix.stackexchange.com/users/316212/veeru. You’ll then be able to edit your answer without needing to get it reviewed and approved. – G-Man Oct 17 '18 at 5:28
  • P.S.  Please don’t annotate edits  by putting a description of the change into the post. – G-Man Oct 17 '18 at 5:28
  • G-Man, i had to add a description because it does'nt accept the edits if less than 10 characters have changed. DId'nt realize the multiple accounts, thought this was a different platform – Veeru Oct 18 '18 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.