Download the PHP package flyhjaelp/gmail2laravel without Composer

On this page you can find all versions of the php package flyhjaelp/gmail2laravel. 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 gmail2laravel

Google2Laravel

Latest Version on Packagist Total Downloads Build Status

A Laravel package to help manage multiple Gmail Clients on the same platform.

This package is build on version 2.0 of the Official google/apiclient package.

Table of Contents

Installation

You can use Composer or simply Download the Release

Usage

Requirements

Instantiating a Google Client Object with multiple Gmail clients

Calling a method

List of methods

Additional list of methods

These methods are being imported from the main Google Gmail Api Package, and can be called as explained in the Gmail API documentation, where a broader description of the parameters required and the response is being provided. Link are provided bellow to each resource.

Setup

Google Developer project

The package makes usage of the Google API library. To gain access to the emails, a Google Cloud Project has to be created. A guide on how to do that can be found on the Google SDK platform Link

Note: the domain extension is important, as you will be able to access emails only from that domain. When creating a new Gmail Client instance, a check will be done automatically if the supplied user email address exists inside the g suite domain.

Service account client

After creating a new project, add Gmail API from the API Library and enable it on the project. After that, you need to assign it a Service account client, which you can create from the Google Console meu.

Note : the service is available only for G-Suite users.

 After you generate a Service user, assign it to the project and provide it the wanted access rights. Its important to add it to the project and not to the Gmail Api, so you have access to other apis included in the project.

Its best practices to separate APIs into separate projects if they are not related in usage.

Keep in mind that you can have multiple services that are assigned to different tasks. You are limited to 100 services per project. The project limit is connected to the quota usage of each project. The quota usage is explained here: Quotas

Roles and Permissions

To access Gmail Resources through a Service account client, you need to assign roles and permission to it. Depending to what the purpose of the project is, you need to add the required permissions. An example

Quotas

For every Developer Project that usage the Gmail API, there is a quota usage measured by the Google servers. A list of the quota price can be found here.

Keep in mind , each type of request is calculated a different amount of quota. This quotas are being added to the quota units per day (1.000.000 default)

and the _quota_units_per_user_per_second_ ( 250 default).

Exceptions and errors

Mention : keep in mind that these exceptions are being thrown by the Google API endpoints, and not by this package. The google project is a very strict environment and rules which may not be imediately obvious may take place. The official documentation provides answer to some of the best practices on how to manage and access the respu

Domain wide delegation (DWD)

This is a common error when running an API call with a service account but not properly completing the domain-wide delegation (DWD) or because the authorization in the admin console has not propagated yet.

This article explains in details the process of DWD.

Domain wide delegation (DWD)

This error happens when the Gmail Client is setup for a specific email address and then the method call is being provided in the arguments with a different user id/email. You need to manage in the call which GmailClient to use and provide as the user id the value of 'me', and the code will take the associated email in return. Example.

Message not found

The message you are trying to fetch is no longer available on the email address, due to maybe permanent deletion or wrong message id. Keep in mind that in some cases, the message id is the same as the thread id

Quota limit reached

Exceeding a rate limit will cause an HTTP 403 or HTTP 429 Too Many Requests response and your app should respond by retrying with exponential backoff. Link to best practices guides to avoid exceeding the limits and how much quota each type of request uses link.

Changelog

Please see the changelog for more information on what has changed recently.

Testing

Contributing

Please see contributing.md for details and a todo list.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Note: Its your responsibility to ensure the storage of the service credentials key. Do not publish them on your repo, and the path to the key, should never be stored directly.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of gmail2laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
illuminate/support Version ^6.0|6.*
google/apiclient Version ^2.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 flyhjaelp/gmail2laravel contains the following files

Loading the files please wait ....