SMTP: 发送电子邮件的通讯协议

风行水上 @ 2011-10-19 16:39:46
标签:

    SMTP是用来发送电子邮件的协议。默认的通讯端口是25。与之相对就的收邮件协议是POP3

    一个典型的SMTP会话如下:

    telnet localhost smtp
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 ... ...
    ehlo localhost
    250-... ... 
    250-ENHANCEDSTATUSCODES
    250-PIPELINING
    250-EXPN
    250-VERB
    250-8BITMIME
    250-SIZE
    250-DSN
    250-ETRN
    250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
    250-DELIVERBY
    250 HELP
    mail from: <[email protected]>
    250 2.1.0 <[email protected]>... Sender ok
    rcpt to: <[email protected]>
    250 2.1.5 <[email protected]>... Recipient ok
    data
    354 Enter mail, end with "." on a line by itself
    this is a test message
    .
    250 2.0.0 p9J8Ui6a010463 Message accepted for delivery
    quit
    221 2.0.0 closing connection
    Connection closed by foreign host.
    
    标签:

      分享到:
      comments powered by Disqus

      19/20ms