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

WireMail::header() does not allow to set any header #858

Open
kixe opened this issue Apr 18, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@kixe
Copy link

commented Apr 18, 2019

Short description of the issue

WireMail::header() does not allow to set any header. Some headers are set twice, respectively overwritten later.

Expected behavior

allowance to modify any header

Actual behavior

not possible to change:

  • Content-Type
  • Content-Transfer-Encoding
    overwritten by WireMail::renderMailHeader()
@ryancramerdesign

This comment has been minimized.

Copy link
Contributor

commented Apr 22, 2019

@kixe The features in the WireMail base class are dependent upon it outputting the correct content-type and content-transfer-encoding headers according to what's been provided to the email. Rendering the correct headers here is the primary purpose of the renderMailHeader method, adjusting content-type according to text vs. html, attachments vs. no-attachments, etc. If you could override those headers, then it would break all of that.

If this is for a descending WireMail module, and you needed for it to do something differently, then it may be best to override the renderMailHeader() method with your own, or not call it in your ___send() method, as WireMail modules typically handle their own header rendering.

If this is not for a descending WireMail module, and you think there's still a use case for overriding these mail headers, please tell me more about the use case and values you are trying to set for these headers, and there's a good chance I can add support for that. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.