2012年3月6日 星期二

以telnet終端機方式使用smtp指令發送郵件

以telnet終端機方式使用smtp指令發送郵件


這對發垃圾郵件的程式高手來說可能只不過是~~~ㄙㄚㄇㄚˋ
不過還是寫起來,供以後參考用.

telnet msa.hinet.net 25

helo abc "打聲招呼吧,我是abc"
250 msr43.hinet.net Hello x-x-x-x.HINET-IP.hinet.net [x.x.x.x], pleased to meet you
mail from : abc@msa.hinet.net "這封郵件從誰寄過來的!?"
250 abc@msa.hinet.net... Sender ok "確定寄件者資訊無誤了!"
rcpt to : abc@msa.hinet.net "寄給誰的?"
250 abc@msa.hinet.net... Recipient ok "收件者確認了~"
data "開始編輯郵件內容"
354 Enter mail, end with "." on a line by itself
test
. "點號結束編輯郵件內容"
250 UAA01416 Message accepted for delivery "郵件已經進入佇列~~"

參考網址
http://www.cqinc.com.tw/coopermaa/932-DC/practice/SMTPCmds.htm#SMTP_Authentication

================



SMTP - How to verify your connection and parameters (TSL/SSL) with TELNET ?




Telnet

Below, you can find all the command that you must tape in the telnet windows.
If you don't use a SSL smtp, you can ommit the lines :
AUTH LOGIN
bG9naW4=                       <-- login
cGFzc3dvcmQ=                   <-- password
ehlo nico
AUTH LOGIN
bG9naW4=                       <-- login
cGFzc3dvcmQ=                   <-- password
MAIL FROM: nicolas.gerard@newfrontiers.com
RCPT TO: gerardnico@gmail.com
DATA
This a big big test
.
QUIT
The Smtp Server will always respond with a message.
If you do a mistake when you tape a command and then you go back to correct it, you will have in anyway an error message. 
QUIT
500 5.5.1 Command unrecognized: "QUIT"
This message is not true, the command QUIT exist but if you have done a mistake as for instance if you have written QUIY, you correct it and you valid, you will have this error.
Open a command dos and launch telnet for the smtp server smtp.xs4all.nl on the port 587
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
 
C:\Documents and Settings\Nicolas>telnet smtp.xs4all.nl 587
The server smtp must answer :
220 smtp-vbr15.xs4all.nl ESMTP Sendmail 8.13.8/8.13.8; Sun, 26 Apr 2009 14:17:28 +0200 (CEST)
And you can begin to talk :
ehlo nico
250-smtp-vbr15.xs4all.nl Hello 5353DF77.cable.casema.nl [83.83.223.119], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 31457280
250-DSN
250-AUTH LOGIN PLAIN
250-STARTTLS
250-DELIVERBY
250 HELP
AUTH LOGIN
334 VXNlcm5hbWU6
bG9naW4=
334 UGFzc3dvcmQ6
cGFzc3dvcmQ=
235 2.0.0 OK Authenticated
MAIL FROM: nicolas.gerard@newfrontiers.com
250 2.1.0 nicolas.gerard@newfrontiers.com... Sender ok
RCPT TO: gerardnico@gmail.com
250 2.1.5 gerardnico@gmail.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
This a big big test
.
250 2.0.0 smtp-vbr15.xs4all.nl accepted message n3QCHS17026035
QUIT
221 2.0.0 smtp-vbr15.xs4all.nl closing connection
 
Connection to host lost.

The result



沒有留言:

如何在Windows的事件檢視器event viewer,查詢開機關機的紀錄

Windows 如何 事件檢視器 查詢開機關機紀錄 Step1: 打開windows的 「 事件檢視器 」,開啟「 建立自訂檢視… 」視窗,在「事件記錄檔」選項,將「Windows 紀錄」內勾選「系統」選項。 Step2: 內含/排除事件識別碼: 」排除事件識別碼打「6005,6...