Download the PHP package postalsys/emailengine-php without Composer
On this page you can find all versions of the php package postalsys/emailengine-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download postalsys/emailengine-php
More information about postalsys/emailengine-php
Files in postalsys/emailengine-php
Package emailengine-php
Short Description Send and receive emails using EmailEngine.app
License MIT
Informations about the package emailengine-php
EmailEngine
Helper library for EmailEngine, the app to access any email account to receive and send emails using an easy-to-use REST API.
Usage
Load and initialize the class
Where
- access_token is a valid Access Token to authenticate API requests
- service_secret is the shared secret value, set on the Service configuration page (used to sign public URLs)
- ee_base_url is the base URL for EmailEngine (eg. the scheme, host and port without any path parameter)
- redirect_url is the default Redirection URL for hosted authentication forms. Once an account is added, the user is redirected to that URL. Additionally
account
andstate
arguments are added as query parameters to this URL.
Hosted authentication
Generate an authentication URL. If you set null
as the account ID, then EmailEngine generates a new unique ID, otherwise whatever you specifiy will be used. If that account already exists, then the config is updated.
Get webhook settings
Set webhook settings
You can set either all or partial setting values for webhook settings
Making API requests
Class exposes a helper method to make API requests against EmailEngine.
Where
- $method is either
"get"
,"post"
,"put"
or"delete"
- $path is the enpoint path, eg
"/v1/stats"
. This path should also include any query arguments if needed, eg."/v1/settings?proxyUrl=true"
- $payload is the payload array for
POST
andPUT
requests. Eg.array("proxyUrl" => "socks://proxy.example.com:1080")
Examples
Register a new account
Wait until the account is connected
Send an email
If sending succeeds, then the sent message is also uploaded to the Sent Mail folder.