Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom-Headers #3

Open
informatJonas opened this issue Feb 10, 2023 · 0 comments
Open

Custom-Headers #3

informatJonas opened this issue Feb 10, 2023 · 0 comments

Comments

@informatJonas
Copy link
Contributor

Hi,

could you implement the functionality that you can send custom headers with?

I have already implemented this on a test basis.
See here:

return array_filter([
	'subject'                => $email->getSubject(),
	'sender'                 => $this->toRecipientCollection([$from])[0],
	'from'                   => $this->toRecipientCollection([$from])[0],
	'replyTo'                => $this->toRecipientCollection($email->getReplyTo()),
	'toRecipients'           => $this->toRecipientCollection($this->getRecipients($email, $envelope)),
	'ccRecipients'           => $this->toRecipientCollection($email->getCc()),
	'bccRecipients'          => $this->toRecipientCollection($email->getBcc()),
	'importance'             => $priority === 3 ? 'Normal' : ($priority < 3 ? 'Low' : 'High'),
	'body'                   => [
		'contentType' => 'html',
		'content'     => $html,
	],
	'attachments'            => $attachments,
	'internetMessageHeaders' => [
		[
			'name'  => 'x-custom-api-message',
			'value' => 'yes',
		],
	],
]);

With the custom headers, like for me "x-custom-api-message", you can for example exclude the messages which have a certain header on the rule when generating signatures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant