MailPace Documentation
website·Indexed 33 days ago
https://docs.mailpace.com/Documentation for MailPace, an email delivery service providing an HTTPS API (v1), SMTP server, and various client libraries. Includes guides on domain verification, inbound email, webhooks, and idempotency, as well as integrations for Node.js, Ruby on Rails, PHP (Swiftmailer, Symfony, Laravel), Rust, and Elixir (Swoosh).
What's inside MailPace
- MailPace provides a Gem/Plugin for Ruby on Rails that allows developers to send emails directly from Rails applications using ActionMailer.Refer to the official repository for installation and usage instructions: https://github.com/mailpace/mailpace-rails
Understand MailPace service capabilities and constraints
MailPace provides an HTTPS API and SMTP Server for sending transactional emails. It eliminates the need for manual email server management. Key constraints and features include:
- Transactional Only: Only transactional emails are permitted; marketing emails and bulk newsletters are strictly prohibited.
- Domain Verification: Domain ownership must be confirmed via DKIM verification before sending emails.
- Recipient Limits: Batch emails are not supported, but you can send to a maximum of 50 recipients per email by providing comma-separated values in the 'To' field.
- DKIM Signing: All emails are signed with DKIM by default to ensure delivery and authenticity.
- Shared IPs: Static IP addresses are not available; shared IPs are used to optimize delivery rates.
- SPF/DMARC: Additional SPF and DMARC configuration is optional as MailPace uses the return path header to pass SPF checks.
- Security: Only HTTPS is supported; unencrypted HTTP is not permitted.
Integrate MailPace with PHP using Swiftmailer
MailPace provides a Swiftmailer transport package for PHP, allowing transactional emails to be sent from PHP applications and frameworks that use Swiftmailer under the hood, such as Laravel and Symfony. The package is available for installation via Composer.# Installation and usage details are available at: # https://github.com/mailpace/mailpace-swiftmailerGet started with the MailPace API
The MailPace API is a RESTful HTTPS API used for sending emails and managing domains. Requests should be sent using any standard HTTP library. The API communicates success or failure via standard HTTP status codes.Base URL: https://app.mailpace.com/api/v1/Verify domain ownership for email sending
To send emails via Mailpace, you must verify ownership of your domain. This process enables DKIM signing, which authenticates that emails originate from an authorized server and have not been tampered with. Verification is handled during onboarding or can be repeated via the 'Verification' page under the Domain settings if DNS providers are changed.Integrate MailPace with Fastify
To use MailPace with the Fastify web framework for Node.js, use the community pluginfastify-ohmysmtpavailable on GitHub.# Install the community plugin npm install fastify-ohmysmtpIntegrate Mailpace with Elixir using ohmysmtp_client
To send emails via Mailpace in an Elixir application, use the community-providedohmysmtp_clientpackage available on Hex. This package provides the necessary SMTP client functionality to connect to Mailpace servers.# Add to mix.exs defp deps do [ {"ohmysmtp_client", "~> 0.1.0"} ] endAdd attachments to a MailPace email
Attachments are sent as an array of objects in the
attachmentsproperty. Thecontentmust be a base64 encoded string. To embed images inline, provide acidvalue, which sets the Content-Disposition to 'inline'.Supported File Extensions:
jpeg,jpg,png,gif,txt,pdf,docx,xlsx,pptx,csv,att,ics,ical,html,zip,auf,xml,dwg.Using unsupported extensions will result in an error.
[ { "name": "myimage.jpg", "content": "[base64-encoded-string]", "content_type": "image/jpeg", "cid": "<myimage.cid>" } ]Use MailPace as a mailer bridge in Symfony
MailPace provides a mailer bridge compatible with Symfony version 5.4 and above. To integrate MailPace, configure it as a 3rd-party transport within the Symfony Mailer component.Verify Inbound Email Webhook Authenticity
To ensure an inbound email originates from MailPace and has not been tampered with, validate theX-MailPace-Signatureheader included in the webhook request using your domain's Webhook Verification Key.Add a List-Unsubscribe header via SMTP
To allow mail clients to display an Unsubscribe link, include theX-List-Unsubscribeheader containing the URI and/or mailto details.X-List-Unsubscribe: <http://www.host.com/list.cgi?cmd=unsub&lst=list>, <mailto:list-request@host.com?subject=unsubscribe>Integrate MailPace with Rust using ohmysmtp
To integrate MailPace with a Rust application, use theohmysmtpcrate available on crates.io.# Add ohmysmtp to your Cargo.toml cargo add ohmysmtp