send email using telnet

  1. Open your command prompt.
  2. Now, connect with telnet using the following command:
    telnet example.com 25
  3. Type ehlo example.com. Some servers also accept helo in place of ehlo.
    ehlo example.com
  4. Type mail from: username@example.com:
    mail from: username@example.com
  5. Type rcpt to: friend@hotmail.com, friend2@yahoo.com (replace with your actual recipient name):
    rcpt to: friend@hotmail.com, friend2@yahoo.com
  6. To write the message - type data, followed by your subject and message. To end the message, put a period on a line by itself and press enter:
    data
    Subject: My Telnet Test Email
    
    Hello,
    
    This is an email sent by using the telnet command.
    
    Your friend,
    Me
    
    .
    
  7. Type quit to exit telnet.
Sample:
[c:\~]$ telnet 138.35.54.172 25




Connecting to 138.35.54.172:25...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.


220 smtpx.svcs.hpe.com ESMTP Postfix
500 5.5.2 Error: bad syntax


500 5.5.2 Error: bad syntax
ehlo 138.35.54.172
250-smtpx.svcs.hpe.com
250-PIPELINING
250-SIZE 31457280
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: xia@hpe.com
250 2.1.0 Ok
rcpt to: xia@hpe.com
250 2.1.5 Ok
data
502 5.5.2 Error: command not recognized
data
354 End data with <CR><LF>.<CR><LF>
Subject: Test mail
Hellow ord!!!


.
250 2.0.0 Ok: queued as E634075E02CA

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值