Home > WeChat Applet > Mini Program Development > Detailed introduction to java email development applet

Detailed introduction to java email development applet

黄舟
Release: 2017-04-15 11:17:38
Original
2142 people have browsed it

First use the DOS window to run the command to send an email:

Start - Run - CMD:

telnet stmp.163.com//此为发送邮件的服务器协议
Copy after login

The server returns a 220 message indicating success.

Then enter:

ehlo *****//ehlo为smtp二代协议,为区别一代的helo,将e和l换个位置。  *为任意内容
Copy after login

The server returns 250 information to indicate success, then select the login method:

auth login plain
Copy after login

Type

auth login
Copy after 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服务器不用加密。
Copy after login

The server returns 235, and the OK message indicates that the login is successful.

Then enter:

mail from : <***@xxx.com>//一定不能出错,也要按顺序输入,否则不成功。也不能修改,输入错字符后回车重新输入。
Copy after login

The server returns 250 for success and 550 for failure.

rcpt to:<***@xxx.com>//同上
Copy after login

The server returns 250 for success and 550 for failure.

data//准备写正文。
Copy after login

Return 354 information to indicate success.

from:<xxxx@xxx.com>//这里的from显示的是查看邮件时发件人信息。可以随便输入。
subject:***** //邮件主题
               //一定要空一格。
test           //这里是内容
.              //以点结束。
Copy after login

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
Copy after login

Resolve the DNS of a certain mailbox server and get the address of the smtp server.

nslookup
set type=mx//邮箱类型
域名
Copy after login

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
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template