LoginSignup
2
2

More than 5 years have passed since last update.

telnetでgmailへメールを送るコマンド(Bash)

Posted at

telnetを使って、gmailのメールアドレスへメールを送ることが出来ます。(2016/04/15現在)
SMTPサーバーの仕様が変われば、使えなくなる可能性があります。

Bash

(echo "EHLO example.com"; sleep 1
echo "MAIL FROM: <example@example.com>"; sleep 1
echo "RCPT TO: <example@gmail.com>"; sleep 1
echo "DATA"; sleep 1
echo "Subject: Subject"; sleep 1
echo "From: example@example.com"; sleep 1
echo "To: example@gmail.com"; sleep 1
echo ""
echo "Content"
echo ""
echo "."; sleep 1
echo ""
echo "quit") | telnet gmail-smtp-in.l.google.com 25

参考

telnetでメール送信 - つれづれなるままに

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2