Send an email using Telnet

Here are simple steps on how to send an email using telnet. This a great way to test your mail server configuration such as exim, sendmail or postfix without a need for a email client. First telnet to yor mail server:

$ telnet mail.mymailserver.com 25

Use HELO command to tell mail server from which domain you are coming from:

HELO linuxconfig.org

Now we need to state from which address this email will be sent. This is done with MAIL FROM: command:

MAIL FROM: someaddress@linuxconfig.org

Next step is to specify recipient with RCPT TO:. Use RCPT TO: multiple times if you would like to send your email to multiple email addresses.

RCPT TO: some@email.add

Now we ca star writing some subject and body. To do that we need to use DATA command. First type DATA followed by Subject: and body. Once done enter . to send email to be queued.

DATA
Subject: Sending an email using telnet

Hello,

Here is my body? Do you like it?

cheers
.

Do not forget "." at the end of the message. To quit type

quit
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值