Download the PHP package aslamhus/sendgrid-email-wrapper without Composer

On this page you can find all versions of the php package aslamhus/sendgrid-email-wrapper. 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-email-wrapper

Aslamhus\Email PHP Class

Overview

This PHP Library, Aslamhus/Email, is convenient and flexible wrapper for interacting with the SendGrid API v3.0.0. It is designed to provide a fluent interface for sending emails via SendGrid, making it simple to integrate email functionality into your PHP projects. The class includes methods for composing and sending emails with features such as dynamic template data, attachments, and more.

Installation / Setup

To use this class in your project, follow these steps:

  1. Create an account with Sendgrid.

  2. Create an API Key in your new sendgrid account. In the sidebar of your dashboard, choose EmailApi, then select Integration Guide from the dropdown. Choose WebApi -> Php, then create your api key. You do not need to install sendgrid through composer, installing this class will do that for you. The last step in the integration guide is to send a verification email. Before we do that, install the library.

  3. Create a single sender identity. This will allow you to send emails from an authenticated email. In the sidebar choose Sender Authentication, then Verify a Single Sender. Follow the steps. You'll use this email in the from method when sending emails.
  4. Install Aslamhus/Email

  5. Send verficiation email (optional)

  6. Confirm verification. Go back to the integration guide in your Sendgrid account, and at the bottom of the page choose Verify Integration. You should get a confirmation that your integration was successful.

Usage

Send basic email

Send Email with dynamic template data

Dynamic template data variables can be set using handlebars {{my_var}}. For more info see https://docs.sendgrid.com/for-developers/sending-email/using-handlebars

Additional Features

Resources

Issues and Contributions

If you encounter any issues or would like to contribute to the development of this class, please visit the GitHub repository: Aslamhus\Email.

Testing

To run tests on this library, follow these steps:

  1. Set your sample.env file with the require fields, then rename sample.env to .env
  2. Run tests

License

This class is open-source and released under the MIT License. Feel free to use, modify, and distribute it according to your project's needs.


All versions of sendgrid-email-wrapper with dependencies

PHP Build Version
Package Version
Requires sendgrid/sendgrid Version ^8.1
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 aslamhus/sendgrid-email-wrapper contains the following files

Loading the files please wait ...