Closed dejudicibus closed 5 months ago
That's really strange - I just tried with a copy/paste of your syntax and it works perfectly for me. I can't see any reason it would/should fail, unless potentially the txt file you created contains maybe some strange or unsupported hidden character encoding - what did you use to create the text file?
What happens if you try with this file? 1-test.txt
I am also getting same error
invalid from address
Tried with 1-test.txt
Still same error
For refrence : I have done setup using docker-compose with this docker-compose.yaml
@bmunshi on what platform is the mailpit sendmail...
being run? I assume for both of you that you're on a recent version of Mailpit too?
I found out what the problem was. If I call just mailpit
I get the error.
To avoid the error I have to call
mailpit -s localhost:1025 -l localhost:8025
I thought that localhost was the default, whereas the default is 0.0.0.0 in both cases (1025 & 8025)
I am confused @dejudicibus - 0.0.0.0
means the Mailpit server should listen on all network interfaces which is the default (ie: not just to "localhost") which should work on Windows too, and the argument you are running is to start the Mailpit server, not to send messages via mailpit sendmail < email.txt
(which is the issue you reported).
So mailpit -s localhost:1025 -l localhost:8025
starts mailpit and listens to "localhost" only (other machines in your network cannot connect), and mailpit sendmail < email.txt
should then be able to send to Mailpit.
@dejudicibus & @bmunshi - I have found the cause. When using sendmail in this way (without specifying a sender's email in the command with -f
), it will automatically detect your username from the system. The issue here is that Windows returns the "user" in the format hostname\username
- and \
is not a valid character in an email ~ so you get the error.
I have just pushed a fix (work-around) in v1.18.2 which will fix this issue for both of you. Please confirm this works for you? Thanks.
@powerquell I don't think this is related to this issue at all. From what I see, your Mailpit requires authentication (250-AUTH LOGIN PLAIN
), but you're not authenticating via telnet first before issuing theMAIL FROM
.
Ahh right - sorry @powerquell, that was not obvious from your original message. Your formatting is incorrect, try MAIL FROM:<test@example.com>
- the SMTP protocol requires <>
around the addresses (including RCPT TO
) (see this).
This issue has been marked as stale because it has been open for 7 days with no activity.
This issue was closed because there has been no activity since being marked as stale.
I installed mailpit and started it. I can see the MailPit interface on localhost:8025 as expected. Then I created a file email.txt as follows
but if I call MailPit as follows
I get the error message
and no messages in the browser interface. Changing the from address to ANY real or fake address makes no change.
Platform: Windows 10 Pro with WampServer 3.2.6 64bit