下面的例子是用139的smtp服务器
telnet smtp.139.com 25 //telnet到smtp端口 Trying 120.232.169.42... Connected to smtp.139.com. Escape character is '^]'. 220 localhost richmail system v10(2f176279184726f-809c0) //服务器返回220 helo mytest //跟服务器打招呼 250 localhost richmail system v10(2f176279184726f-809c0) //服务器返回250 auth login //登录 334 dXNlcm5hbWU6 //服务器返回334 *** //*此处输入base64编码后的qq邮箱名*/ 334 UGFzc3dvcmQ6 //服务器返回334 *** //*此处输入base64编码后的授权码*/ 235 Authentication successful //登录成功 mail from: <kfwtry@139.com> //发件邮箱 250 ok rcpt to: <lp459rh@qq.com> //收件邮箱 250 ok data //开始写信 354 end with . to:hello //邮件收件人的名称 from:mytest //邮件来源名称 subject: this is a test telnet smtp mail //邮件标题 hello,my friend //消息内容 This is a test mail form 139.com //消息内容 . //英文的点,邮件结束标志。即刻发送
Base64在线编码/解码 https://base64.us/