Suppose there is a file ybx.txt with the following content:
ffff_zhang@126.com***990403****
wll781103@163.com***wll781103****
wll781103@126.com***wll781103****
.................
Batch file 1 (163.bat):
@echo on
setlocal enabledelayedexpansion
set Username=%1 set Password=%2
start
http://reg.163.com/in.jsp?url=http://fm163.163.com/coremail/fcg/ntesdoor2?verifycookie=1^&language=-1^&style=-1^&username=!Username!^&password=!Password!
Batch file 2 (126.bat):
@echo off
set mail=126
::Set user
set user=%1
:Set password
set pass=%2
::126 email login URL
set "126=https://entry.mail.126.com/cgi/login?&bCookie=&user=%user%&pass=%pass%"
::Login
cmd /c start "" "%%%mail%%%"
Then create a third batch file (Smart Email Login.bat)
@echo off
setlocal enabledelayedexpansion
for /f "tokens=1,2,3 delims==@,*" %%i in ('findstr @ ybx.txt') do (
if %%j==163.com (call 163.bat %%i %%k)
if %%j==126.com (call 126.bat %%i %%k)
if %%j==yeah.com (call yeah.bat %%i %%k)
if %%j==yahoo.com.cn (call yahoo.bat %%i %%k)
pause
)
pause
----After testing, it has successfully logged in to the mailbox with known username and password.
Execute Smart Email Login.bat, read the username and password as parameters, and determine the email type, call the corresponding batch file 126.bat or 163.bat, and pass the parameters to them.
Yahoo.bat and yeah.bat can also be added.
I completely borrowed 126.bat or 163.bat from others, just used parameters.
The content of ybx.txt is fictional, you should change it to what you know. There is also a good way to establish it. If you have a large number of usernames and passwords.
[
Last edited by ybxcyx on 2007-12-26 at 08:07 AM ]