CloudflareTransport
class CloudflareTransport extends AbstractTransport (View source)
Properties
| protected | $client | The HTTP Client instance. |
Methods
Create a new Cloudflare transport instance.
{@inheritDoc}
Get the Cloudflare payload for the given message.
Get the recipients without CC or BCC.
Get the custom headers for the email, excluding the standard ones.
Get the attachments formatted for the Cloudflare API.
Get the address formatted for the Cloudflare API.
Get multiple addresses formatted as strings for the Cloudflare API.
Get the string representation of the transport.
Details
__construct(string $accountId, string $key, HttpClientInterface|null $client = null)
Create a new Cloudflare transport instance.
protected void
doSend(SentMessage $message)
{@inheritDoc}
protected array
getPayload(SentMessage $message)
Get the Cloudflare payload for the given message.
protected array
getRecipients(Email $email, Envelope $envelope)
Get the recipients without CC or BCC.
protected array
getCustomHeaders(Email $email)
Get the custom headers for the email, excluding the standard ones.
protected array
getAttachments(Email $email)
Get the attachments formatted for the Cloudflare API.
protected string|array
formatAddress(Address $address)
Get the address formatted for the Cloudflare API.
protected array
stringifyAddresses(array $addresses)
Get multiple addresses formatted as strings for the Cloudflare API.
string
__toString()
Get the string representation of the transport.