Send email from the command line with SendGrid

Use the following command in order to send your email

#!/bin/bash

curl -d 'to=[ Destination Email ]&toname=[ Destination Name ]&subject=[ Subject ]&text=[ Body ]&from=[ From Email ]&api_user=[ Sendgrid Username ]&api_key=[ Sendgrid Password ]' https://api.sendgrid.com/api/mail.send.json

 

Top