Download the PHP package godpod/sendgrid without Composer

On this page you can find all versions of the php package godpod/sendgrid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sendgrid

SendGrid-php

This library allows you to quickly and easily send emails through SendGrid using PHP.

WARNING: This module was recently upgraded from 1.1.7 to 2.X. There were API breaking changes for various method names. See usage for up to date method names.

Important: This library requires PHP 5.3 or higher.

BuildStatus Latest Stable Version

Installation

Add SendGrid to your composer.json file. If you are not using Composer, you should be. It's an excellent way to manage dependencies in your PHP application.

Then at the top of your PHP script require the autoloader:

Alternative: Install from zip

If you are not using Composer, simply download and install the latest packaged release of the library as a zip.

⬇︎ Download Packaged Library ⬇︎

Then require the library from package:

Previous versions of the library can be found in the version index.

Example App

There is a sendgrid-php-example app to help jumpstart your development.

Usage

To begin using this library, initialize the SendGrid object with your SendGrid credentials.

Create a new SendGrid Email object and add your message details.

Send it.

addTo

You can add one or multiple TO addresses using addTo.

setTos

If you prefer, you can add multiple TO addresses as an array using the setTos method. This will unset any previous addTos you appended.

setFrom

setFromName

setReplyTo

Cc

addCc

setCc

setCcs

removeCc

Bcc

Use multiple addTos as a superior alternative to setBcc.

But if you do still have a need for Bcc you can do the following:

addBcc

setBcc

setBccs

removeBcc

setSubject

setText

setHtml

setDate

setSendAt

setSendEachAt

addSendEachAt

Categories

Categories are used to group email statistics provided by SendGrid.

To use a category, simply set the category name. Note: there is a maximum of 10 categories per email.

addCategory

setCategory

setCategories

removeCategory

Attachments

Attachments are currently file based only, with future plans for an in memory implementation as well.

File attachments are limited to 7 MB per file.

addAttachment

setAttachment

setAttachments

removeAttachment

You can tag files for use as inline HTML content. It will mark the file for inline disposition using the specified "cid".

Important Gotcha: setBcc is not supported with attachments. This is by design. Instead use multiple addTos. Each user will receive their own personalized email with that setup, and only see their own email.

Standard setBcc will hide who the email is addressed to. If you use the multiple addTo, each user will receive a personalized email showing *only their email. This is more friendly and more personal. Additionally, it is a good idea to use multiple addTos because setBcc is not supported with attachments. This is by design.

So just remember, when thinking 'bcc', instead use multiple addTos.

Substitutions

Substitutions can be used to customize multi-recipient emails, and tailor them for the user

addSubstitution

Substitutions can also be used to customize multi-recipient subjects.

setSubstitutions

Sections

Sections can be used to further customize messages for the end users. A section is only useful in conjunction with a substitution value.

addSection

setSections

Unique Arguments

Unique Arguments are used for tracking purposes

addUniqueArg / addUniqueArgument

setUniqueArgs / setUniqueArguments

Filter Settings

Filter Settings are used to enable and disable apps, and to pass parameters to those apps.

addFilter / addFilterSetting

setFilters / setFilterSettings

Headers

You can add standard email message headers as necessary.

addHeader

setHeaders

removeHeader

Options

Options may be passed to the library when initializing the SendGrid object:

Changing URL

You may change the URL sendgrid-php uses to send email by supplying various parameters to options, all parameters are optional:

A full URL may also be provided:

Ignoring SSL certificate verification

You can optionally ignore verification of SSL certificate when using the Web API.

Sending to 1,000s of emails in one batch

Sometimes you might want to send 1,000s of emails in one request. You can do that. It is recommended you break each batch up in 1,000 increments. So if you need to send to 5,000 emails, then you'd break this into a loop of 1,000 emails at a time.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Running Tests

The existing tests in the test directory can be run using PHPUnit with the following command:

or if you already have PHPUnit installed globally.

Releasing

To release a new version of this library, update the version in all locations, tag the version, and then push the tag up. Packagist.org takes care of the rest.

Testing uploading to Amazon S3

If you want to test uploading the zipped file to Amazon S3 (SendGrid employees only), do the following.


All versions of sendgrid with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
sendgrid/smtpapi Version 0.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package godpod/sendgrid contains the following files

Loading the files please wait ....