mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #499] SMTP MAIL command not respected #324
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#324
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 @VikingPingvin on GitHub (May 23, 2025).
Original GitHub issue: https://github.com/axllent/mailpit/issues/499
I'm using Mailpit in an integration test for my Go application as an SMTP server.
I'm using Go's built-in smtp package and issuing a
MAILSMTP command (https://pkg.go.dev/net/smtp#Client.Mail) , where I set the sender address (from).However, Mailpit reports
[ Unknown ]in theFromfield after receiving the message.I'd expect it to report the address I set using the SMTP MAIL command.
Am I doing something wrong?
(FROM is working fine if I'm including it in the message payload, but that is not what I want to do here)
@axllent commented on GitHub (May 23, 2025):
Hi @VikingPingvin.
Sorry, I'm not exactly sure what it is you are trying to do here. The
Fromin Mailpit is theFromaddress stated in the email header. If this is missing in the payload, then it is "unknown" (not specified). As I understand it, theFromyou are setting in the Go SMTP module is effectively theReturn-Pathyou are telling the SMTP server to bounce emails to - they are two separate things.@VikingPingvin commented on GitHub (May 23, 2025):
Hi @axllent , thanks for the quick reply.
You are right, I confused the two and I just needed to research a bit more in the topic.
Apologies and all the best to you!