First use the DOS window to run the command to send an email:
Start - Run - CMD:
telnet stmp.163.com//此为发送邮件的服务器协议
The server returns a 220 message indicating success.
Then enter:
ehlo *****//ehlo为smtp二代协议,为区别一代的helo,将e和l换个位置。 *为任意内容
The server returns 250 information to indicate success, then select the login method:
auth login plain
Type
auth login
and returns 334 to indicate successful login. Then enter the username and password to log in and end with the Enter key.
//这里的账号和密码必须经过base64加密。若是pop3服务器不用加密。
The server returns 235, and the OK message indicates that the login is successful.
Then enter:
mail from : <***@xxx.com>//一定不能出错,也要按顺序输入,否则不成功。也不能修改,输入错字符后回车重新输入。
The server returns 250 for success and 550 for failure.
rcpt to:<***@xxx.com>//同上
The server returns 250 for success and 550 for failure.
data//准备写正文。
Return 354 information to indicate success.
from:<xxxx@xxx.com>//这里的from显示的是查看邮件时发件人信息。可以随便输入。 subject:***** //邮件主题 //一定要空一格。 test //这里是内容 . //以点结束。
If the server returns 250 information, it means the sending is successful. The function of sending emails using DOS is realized.
Here, when we send emails, we need to confirm the identity through username and password, but do different email servers need to be confirmed? the answer is negative.
So, how can we pretend to be a server and send emails directly to an email server?
First we need to obtain the IP address of the machine to impersonate a server:
ipconfig /all//拿到IP
Resolve the DNS of a certain mailbox server and get the address of the smtp server.
nslookup set type=mx//邮箱类型 域名
Find out the SMTP server address and copy it, such as 163mx02.mxmail.netease.com of 163.
Then connect to the server:
telnet 163mx02.mxmail.netease.com 25 ehlo IP//这里填写的是本机IP
OK, the rest is the same as before. In this way, this machine is used as a server to send emails (to determine whether it is a server, you need to reversely parse the dns to see if it is the same as the IP).
The above is the detailed content of Detailed introduction to java email development applet. For more information, please follow other related articles on the PHP Chinese website!