mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #129] Improve Documentation to show how to send an HTML format file as an email #85
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maza256 on GitHub (Jun 24, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/129
The documentation currently only shows how to send a plain text email. It would be wonderful if it could be used to send a fully formatted HTML file.
@axllent commented on GitHub (Jun 25, 2023):
The example in the documentation is purely intended to briefly test whether sendmail & Mailpit is working. Fully formatted HTML emails are typically not sent from the commandline, but rather send via applications using (for example) PHP, Ruby, Java, Go, etc which often then use sendmail to relay the message. This falls completely outside of the scope of Mailpit and/or the documentation.
If you do specifically wish so send an HTML email via the commandline, a simple Google search returns the following example:
@ilhamsyahids commented on GitHub (Mar 22, 2025):
Hello @axllent
I'm trying to send email with
multipart/alternativelike as you do, however it appear as Text in web ui and not showing anything, I use latestaxllent/mailpit:v1.23and with only configMP_SMTP_AUTH_ACCEPT_ANY,MP_SMTP_AUTH_ALLOW_INSECURE. Can you help me for this?Thanks
@axllent commented on GitHub (Mar 22, 2025):
@ilhamsyahids That would be because that example does not contain a text part. Try something like this:
@ilhamsyahids commented on GitHub (Mar 22, 2025):
I see, I know the issue was. Apparently, mailpit cannot detect it html and text part if the the boundary has
<>, please see the image below:I also tried when its not contain the prefix (
boundary=<asdfghjkl@example.net>), the result was email not appear in the mailpit.I confirmed in gmail, both are works:
Can you confirm on your end? @axllent
@axllent commented on GitHub (Mar 22, 2025):
@ilhamsyahids I would suggest that it is because you're using invalid characters. I don't think
<&>are legally allowed. See https://stackoverflow.com/a/147467@ilhamsyahids commented on GitHub (Mar 25, 2025):
Thats make sense, thanks for your confirmation @axllent