Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Mailer] message metadata and tags #35047

Copy link
Copy link
Closed
@kbond

Description

@kbond
Issue body actions

Description
Transports like Postmark and Mailgun support message metadata and tags. The context of this issue will be Postmark.

#34766 implements tag support in Postmark by using a Tag header. This will work when using the Postmark API transport but not using the SMTP transport. For SMTP you need to add a custom header:

X-PM-Tag: password-reset

With the Postmark API, metadata is a key, value object added to the payload:

"Metadata": {
    "Color":"blue",
    "Client-Id":"12345"
}

With SMTP, it is a custom header for each value:

X-PM-Metadata-Color: blue
X-PM-Metadata-Client-Id: 12345

Example
Ideally, it would be nice to be able to do the following:

$email->setTag('password-reset');
$email->addMetadata('Color', 'blue');
$email->addMetadata('Client-Id, '12345');

Then the transports could convert to their specific tag/metadata format.

I can work on a PR for this if we can nail down how we want this to work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.