Chinaunix首页 | 论坛 | 博客
  • 博客访问: 201791
  • 博文数量: 63
  • 博客积分: 2764
  • 博客等级: 少校
  • 技术积分: 620
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-28 21:11
文章分类

全部博文(63)

文章存档

2011年(35)

2010年(28)

我的朋友

分类: LINUX

2011-04-01 14:14:54

SMTP transport example

A typical example of sending a message via SMTP to two mailboxes (alice and theboss) located in the same mail domain (example.com) is reproduced in the following session exchange.

For illustration purposes here (not part of protocol), the protocol exchanges are prefixed for the server (S:) and the client (C:).

After the message sender (SMTP client) establishes a reliable communications channel to the message receiver (SMTP server), the session is opened with a greeting by the server, usually containing its fully qualified domain name (FQDN), in this case smtp.example.com. The client initiates its dialog by responding with a HELO command identifying itself in the command's parameter with its FQDN (or an address literal if none is available).[2]

S: 220 smtp.example.com ESMTP Postfix 
C: HELO relay.example.org 
S: 250 Hello relay.example.org, I am glad to meet you 
C: MAIL FROM: 
S: 250 Ok 
C: RCPT TO: 
S: 250 Ok 
C: RCPT TO: 
S: 250 Ok 
C: DATA S: 354 End data with . 
C: From: "Bob Example"  
C: To: "Alice Example"  
C: Cc: theboss@example.com 
C: Date: Tue, 15 Jan 2008 16:02:43 -0500 
C: Subject: Test message 
C: C: Hello Alice. 
C: This is a test message with 5 header fields and 4 lines in the message body. 
C: Your friend, C: Bob C: . 
S: 250 Ok: queued as 12345 
C: QUIT S: 221 Bye
{The server closes the connection}

阅读(1647) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~