China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 08:27
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » p-mailsend_4.0.cmd (send email from command line, mass mailing\multiple attachments\anonymous) DigestII View 80,857 Replies 122
Floor 31 Posted 2007-04-26 09:15 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Originally posted by bjsh at 2007-4-26 08:15:

Good!
This way I can learn good things from you; heh heh

Actually, it's all just repetitive actions
Floor 32 Posted 2007-04-26 09:59 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 2,000
Posts 621
Joined 2007-01-01 00:00
19-year member
UID 75212
Gender Male
Status Offline
Just now I took a look:

For the following websites
163 yahoo qq hotmail gmail 56 sina sohu 21cn

The ones with the same processing method as 163 are:
smtp.qq.com 219.133.60.51
smtp.sina.com 202.108.3.233
smtp.sohu.com 220.181.26.195
smtp.21cn.com 202.104.32.230

The ones with a slight change are:
smtp.56.com 61.143.210.110
The first one needs to use EHLO instead of HELO
The subsequent operations are the same as the previous ones

For:
smtp.gmail.com 64.233.163.111

I don't know what to do;

Please help vkill to answer
Floor 33 Posted 2007-04-26 10:12 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Originally posted by bjsh at 2007-4-26 09:59:
Just now I took a look:
For the following websites
163 yahoo qq hotmail gmail 56 sina sohu 21cn

The same processing method as 163 has:
smtp.qq.com 219.133.60.51
smtp.sina.com 202.108.3.233
smtp.sohu.com 22 ...

It seems that gmail requires some special authentication, and I'm not very clear about it either
Floor 34 Posted 2007-04-26 10:55 ·  中国 广东 广州 海珠区 电信
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
Actually, you can set the.ini file.

Otherwise, sending an email will be complicated by you.

------------------------------------------------------------------------
知,不觉多。不知,乃求知
Floor 35 Posted 2007-04-26 12:13 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 2,000
Posts 621
Joined 2007-01-01 00:00
19-year member
UID 75212
Gender Male
Status Offline
flyinspace能否详细说一下:

flyinspace, can you please elaborate in detail:
Floor 36 Posted 2007-04-26 12:19 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Originally posted by flyinspace at 2007-4-26 10:55:
Actually, you can set up the .ini file.

Otherwise, sending an email would make it more complicated for you.

------------------------------------------------------------------------

My idea
find "condition" "%~nx0" isn't this better
Floor 37 Posted 2007-04-26 14:30 ·  中国 广东 广州 联通
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
----------------------------------------------------------------

[ Last edited by flyinspace on 2007-4-26 at 01:09 PM ]
知,不觉多。不知,乃求知
Floor 38 Posted 2007-04-26 14:37 ·  中国 广东 广州 联通
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
Actually, the purpose of what we are doing here is just like setting default values in C++.

bool sub(username, password, POP server, port) where all have default values.
{
base64 convert username, password
verify if the login is successful.
if yes, return success
}
知,不觉多。不知,乃求知
Floor 39 Posted 2007-04-26 22:16 ·  中国 浙江 杭州 华数宽带
银牌会员
★★★
Credits 2,000
Posts 621
Joined 2007-01-01 00:00
19-year member
UID 75212
Gender Male
Status Offline
to: flyinspace

Oh:

Brother can take a look at the code I posted on floor 20 yesterday;

That code initially requires entering username\password\topic\content\attachment\

Then generate the test file to verify whether it can log in successfully;

Then generate the post file (actually the configuration file you mentioned; the two have the same function);

As for what you said about having default values; you can completely not delete the generated post file at the end;

Add a line if exist post; this effect is equivalent to a configuration file; the difference is that this configuration file does not use the ini suffix; heh heh;

Essentially the same;

That code can also

=====Parameter check======No matter how the parameters are entered, it's okay==============


And it's much more concise than brother's;

That code is a place that Brother vkill is very worthy for us to learn; using shift shifting; brother has time to take a good look;
Floor 40 Posted 2007-04-28 08:13 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Updated again
Floor 41 Posted 2007-04-28 09:04 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Brother bjsh, Brother lxm, help me test it~ I only tested QQ, Yahoo, 163, I didn't test others, can't test.
Floor 42 Posted 2007-04-28 09:52 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 2,000
Posts 621
Joined 2007-01-01 00:00
19-year member
UID 75212
Gender Male
Status Offline
Brother vkill is really efficient!!
Floor 43 Posted 2007-04-28 09:58 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 2,000
Posts 621
Joined 2007-01-01 00:00
19-year member
UID 75212
Gender Male
Status Offline
First, I have a suggestion: before testing whether the login is successful, first test if it can be pinged;
ping -n 1 %smtp% >nul 2>nul || (echo Confirm network connection.. & goto :eof)

Found a few small problems;

Sending email successfully will also prompt that sending email is unsuccessful;
The problem is in:
echo !10! | findstr "^250" 1>nul 2>nul || (echo Sending email unsuccessful & goto :eof )

Change !10! to !9!

D:\post>for /F "tokens=1-2 delims=:" %a in ('findstr /N . p-mailsend.log') do (set "%a=%b" )

D:\post>(set "1=220 163.com Anti-spam GT for Coremail System (163com)" )

D:\post>(set "2=250 OK" )

D:\post>(set "3=334 fdsfdsfsadfsadsf" )

D:\post>(set "4=334 dfsdfsdsfdfdfdsf" )

D:\post>(set "5=235 Authentication successful" )

D:\post>(set "6=250 Mail OK" )

D:\post>(set "7=250 Mail OK" )

D:\post>(set "8=354 End data with <CR><LF>.<CR><LF>" )

D:\post>(set "9=250 Mail OK queued as smtp10,dfsfdsdfsfdsfsdfdsdsf==.121322316541321 13213" )

D:\post>(set "10=221 Bye" )

D:\post>if not defined 10 (echo Sending email unsuccessful & goto :eof )

D:\post>echo !10! | findstr "^250" 1>nul 2>nul || (echo Sending email unsuccessful & goto :eof )
Sending email unsuccessful



Login unsuccessful.. Attachment too large... Sending email unsuccessful will not call :del_
Should add;
echo !9!|findstr "^250" >nul 2>nul ||(echo Sending email unsuccessful&call :del_ &goto :eof)

Also, Brother vkill, is it not finished yet!;

Why is there only verification method 1;
For smtp.56.com, verification method 2 has not been written yet!!

Almost perfect!!

Written really beautifully

[ Last edited by bjsh on 2007-4-27 at 09:35 PM ]
Floor 44 Posted 2007-04-28 13:21 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Hehe, Brother bjsh raised several good points, I will improve them as soon as possible
Floor 45 Posted 2007-04-29 03:38 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Brother bjsh,

Except for the verification method 2 for smtp.56.com not being written yet!! Apart from this, the others are all perfected. Hehe, test again.
Forum Jump: