Sendgrid-php 

 
 

Open Source PHP Library for Emails

Free PHP API that allows creating and sending email messages to single or multiple recipients, transactional templates, viewing email statistic and much more.

Sendgrid-php API makes developer's life easy by providing complete functionality for sending email messages through SendGrid using PHP. SendGrid is cloud-based email delivery service and handles all the heavy tasks involved in sending messages and getting them delivered. It is very easy to use inside your own application and allows users to fully integrate with SendGrid.

 The library is very flexible and makes it easy for the user to do custom integration. It provides several important features related to email management using PHP commands, such as sending an email message to single or multiple recipients, adding attachments, sending multiple emails to multiple recipients, transactional templates support, viewing email statistic, sending an SMS message, sending receipts to customers automatically and many more.

Previous Next

Getting Started with Sendgrid-php

It is highly recommended to use Composer for installing Sendgrid-php, library. You can download composer and after that can easily install the library using the following command. For smooth working, you need to create a SendGrid account and create an API Key

Install Sendgrid-php API via Composer 

composer require sendgrid/sendgrid 

Send Emails a Single or Multiple Users via PHP API

The sendgrid-php library allows PHP programmers to programmatically sending email messages from their own PHP applications. The library has included several useful functions for sending and receiving email messages, such as sending emails to a single recipient, sending email messages to multiple users, sending multiple email messages to multiple users, add attachments to emails, sending email messages with Twilio Email and many more.

Add Attachments to Emails via PHP

Sending email attachments are very commonly used to share data with multiple users inside an organization. The open source email library sendgrid-php, enables support developers to send email messages with multiple attachments inside their own PHP applications. You can easily attach multiple files using addAttachments method.  The library supports attaching files from Box as well as from Amazon S3 storage to your emails. It is very easy to attach PDF documents, a word processing file, a photograph, a spreadsheet document, and or anything else.

Email Statistics Support

The free email library sendgrid-php has included complete support for accessing and viewing email statistics inside your own applications using PHP.  The library provided several ways to check and view global as well as user statistics. You can retrieve all of your global email statistics between a given date range, retrieve statistics of sub-users, retrieve the monthly email statistics for all sub-users, view statistics for up to 10 different sub-users, retrieve monitor settings for a sub-user, and son on.

Create and Use Transactional Email Templates

The sendgrid-php library has provided support for sending email messages with a transactional template. You can easily create your own email templates using HTML, CSS and some content. It is always a good practice to test your templates before sending them to customers. For an easy start, you can use a free template from the internet and modify it according to your own needs. It is recommended to use table-based HTML templates as many popular email apps only read table-based HTML. You can easily modify and duplicate you templates.