Cloud Emailer Service, Configuring use of the Cloud Emailer Service
How to configure an application or host to use the Cloud Emailer Service using authenticated SMTP or a rest API.
If you have been using SMTP to send email to the campus email relays, updating your SMTP configuration is likely to be the easiest way for you to use the Cloud Emailer Service.
If you would like to use more advanced techniques, a REST API is also available to developers.
Whether you use the API or SMTP, the service expects an API key along with each request you make, as an authentication token. For SMTP delivery, the API key is used as an SMTP authentication password. You will also need your sub-account number, which will be provided to you by the service team. You can read more about that in the Sending With SMTP section below. The service team can assign an API key for each sub-account, each with its own permissions to restrict what each key is used for.
SMTP (easy mode)
If you need to integrate with a service which speaks SMTP, you can use these settings:
- SMTP host: smtp.sparkpostmail.com
- Port: 587 or 2525
- Encryption: STARTTLS
- Username: SMTP_Injection
- Password: <api key with "send via SMTP" permission>
Note: some hosting providers block outbound SMTP, so you may need to request that access before you can send via SMTP from your host.
The specific sending domains, bounce domain, and tracking domain for your sub-account are assigned by the service team at account creation. If you need changes made to these settings please submit a request at firstname.lastname@example.org.
For more details including how to use advanced SMTP features, check out the SMTP API reference.
REST API (advanced mode)
The Cloud Emailer Service is built upon a developer-centric email delivery service. That means it comes with a comprehensive REST API for sending mail, tracking engagement and so on. If you’d like to dive right in, you can read the vendor API reference documentation and they have a collection for Postman to help you experiment with manual API calls.
For REST API calls, your API key must be included in an Authorization header on your HTTP request:
Sending With The REST API
The modern way to send email is using the REST API’s transmissions endpoint which supports high volume, multi-recipient delivery, personalized message templates, per-recipient metadata and a slew of other capabilities besides. Here’s a simple transmission request:
Vendor API Client Libraries
The Cloud Emailer Service vendor provides libraries, add-ons and plugins for various environments, to simplify your integration:
There are also a Heroku add-on, a Zapier zap and a WordPress plugin.