[Docs] Add telnet example
gruz opened this issue · comments
AHeavyObject commented
I cannot find where to propose changes for this page:
https://mailpit.axllent.org/docs/install/testing/
So I write here.
sendmail -t -S localhost:1025 < email.txt
give an error
sendmail: invalid option -- 'S'
A one-liner for testing:
{
echo "EHLO localhost"
sleep 1
echo "MAIL FROM: <your_email@example.com>"
sleep 1
echo "RCPT TO: <recipient@example.com>"
sleep 1
echo "DATA"
sleep 1
echo "From: <your_email@example.com>"
echo "To: <recipient@example.com>"
echo "Subject: Your Subject"
echo ""
echo "Your message body"
echo "."
sleep 1
echo "QUIT"
} | telnet localhost 1025
Ralph Slooten commented
Your sendmail implementation obviously does not support setting the SMTP server, however your suggested approach should work on unix-like systems (though probably not on Windows). I will add this to the docs, thanks.
Ralph Slooten commented
I've added this testing method to https://mailpit.axllent.org/docs/install/testing/#test-using-telnet (I removed the sleep 1
lines as it appears to work perfectly fine without). Thanks.