Introduction to the organizational structure of e-mail and detailed explanation of e-mail implementation (3)

In order for various e-mail processing programs to recognize the e-mail we write and analyze and extract the sender, recipient, e-mail subject, e-mail content and attachments from the e-mail we write, the e-mail we write must follow certain format requirements, just as we manually experienced the SMTP and POP3 protocols in our last blog, We have a fixed way of writing when sending mail. The basic format and specific details of this email content are defined by rfc822 document and MIME Protocol respectively.

English reference documents are as follows: https://tools.ietf.org/html/rfc822

1 Received: from smtpbg5. qq. com (unkNown [183.60.61.230]) by mx6 (Coremail) with SMTP id OMCowAcxv+ssf99ZD5FqAg--.5570S3; Thu,12 Oct 2017 22:41:48 +0800 (CST) 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq. com; s=s201512; t=1507819308; bh=N2xK6iU/bt0tcntOdutSQ3tkYXbTtOi08RT+HjuXmBc=; h=From:To:Subject:Mime-Version:Content-Type:Content-@R_ 918_ 301@:Date:Message-ID; b=lzBtxAWw0+HB1bGLkkCqlUeU4bvVoMxDp3UZTKq3YCIJt5Ypu4FkE0m5rrrpcxF0D W0/PQajrQTughLTmpjoudI5aDWjfrfkOc1Z0+ltaAraoZfdE5HmNQ0hxQstNa+IbjC GMVEzCOMikVm5qklyCz/1Lwd5mBJ90YkknS3sL08= 3 X-QQ-FEAT: Gf8h89u9tNwRjwDYIPPhYegibbvTgUmwr4I/ntV6mwr6YOyFiWpUpVj+bCsJz tAz24NjMs/p1D8BXG7LYvZRCPMPQV7jdW3AKJTclRSS9xE29fxWsEjYk5QlD1cMIuhHF9Po 1HMwWKIZX8q6smehIwr+t/du8 sprvHVue4ty5KMPeWw967qaAZgta5hcnRtgajhZRcIumVx r+K4/nY7I+wwNenOTfHT4Ly4K1Ne+vD7VNJbLHH674HEJ2CsoSEEBW7X/LeeSq6M= 4 X-QQ-SSF: 0001000000000010000000000000007 5 X-HAS-ATTACH: no 6 X-QQ-BUSINESS-ORIGIN: 2 7 X-Originating-IP: 113.57. 253.69 8 X-QQ-STYLE: 9 X-QQ-mid: webmail4t1507819307t4823829 10 From: "=?ISO-8859-1?B?MTEzMjgwMzk1MQ==?=" < 1132803951@qq.com > 11 To: "=?ISO-8859-1?B?MTgyNzEyNjU3MzI=?=" < 18271265732@163.com > 12 Subject: hello world 13 Mime-Version: 1.0 14 Content-Type: multipart/alternative; boundary="----=_NextPart_59DF7F2B_08CB07D0_339F08F2" 15 Content-@R_ 918_ 301@: 8Bit 16 Date: Thu,12 Oct 2017 22:41:47 +0800 17 X-Priority: 3 18 Message-ID:
19 X-QQ-MIME: TCMime 1.0 by Tencent 20 X-Mailer: QQMail 2. x 21 X-QQ-Mailer: QQMail 2. x 22 X-QQ-SENDSIZE: 520 23 Received: from qq. com (unkNown [10.137.130.92]) by smtp. qq. com (ESMTP) with SMTP id ; Thu,12 Oct 2017 22:41:47 +0800 (CST) 24 Feedback-ID: webmail:qq. com:bgweb:bgweb4 25 X-CM-TRANSID:OMCowAcxv+ssf99ZD5FqAg--.5570S3 26 Authentication-Results: mx6; spf=pass smtp. mail= 1132803951@qq.com ; dki m=pass header. i=@qq. com 27 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4RWLvtDUUUU 28 This is a multi-part message in MIME format. 29 Content-Type: text/plain; charset="ISO-8859-1" 30 Content-@R_ 918_ 301@: base64 31 PGRpdj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6ICdsdWNpZGEgR3JhbmRlJywgVmVyZGFu YSwgJ01pY3Jvc29mdCBZYUhlaSc7IGxpbmUtaGVpZ2h0OiAyMy44cHg7Ij5UaGlzIGlzIHRo ZSBmaXJzdCBlbWFpbCBzZW50IGJ5IGhhbmQgdXNpbmcgdGhlIFNNVFAgcHJvdG9jb2w8L3Nw YW4+PC9kaXY+

This blog, with the previous two blogs, we will talk about the basic principle of sending and receiving e-mail. Then someone will ask, do we also need to consider the underlying implementation protocol of e-mail in the actual project? The answer is No. for example, the JavaMail API developed by Sun company (now acquired by orcal) is a set of standard development packages to facilitate Java developers to realize mail receiving and sending functions in applications, shielding the underlying mail implementation protocol. In the next blog, we will use JavaMail to realize mail receiving and sending functions.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>