1. Products
  2.   Email
  3.   PHP
  4.   Sendgrid-php 

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 statistics and much more.

Sendgrid-php API makes the developer's life easy by providing complete functionality for sending email messages through SendGrid using PHP. SendGrid is a cloud-based email delivery service that 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 statistics, 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 to Single or Multiple Users via PHP API

The sendgrid-php library allows PHP programmers to programmatically send 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, adding attachments to emails, sending email messages with Twilio Email, and many more.

Add Attachments to Emails via PHP

Sending email attachments is 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, word processing files, a photograph, spreadsheet documents, and 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 usage 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 sub-users, and so 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 your templates.

 English