{"id":40,"date":"2008-07-31T08:00:31","date_gmt":"2008-07-31T15:00:31","guid":{"rendered":"http:\/\/cknotes.com\/?p=40"},"modified":"2008-07-31T08:00:31","modified_gmt":"2008-07-31T15:00:31","slug":"smtp-protocol-in-a-nutshell","status":"publish","type":"post","link":"https:\/\/cknotes.com\/smtp-protocol-in-a-nutshell\/","title":{"rendered":"SMTP Protocol (in a Nutshell)"},"content":{"rendered":"<p><strong>Question:<\/strong><\/p>\n<p>SendMime requires a from \u00a0and \u00a0recipients address string, but the MIME message contains both .\u00a0 The message I receive from the SendMime seems to ignore the addresses in the call and uses the one in the MIME.\u00a0 So why require a from and recipient address?<\/p>\n<p><strong>Answer:<\/strong><\/p>\n<p>The SMTP protocol works like this:<\/p>\n<p>1) A client connects to an SMTP server.<\/p>\n<p>2) The SMTP server says &#8220;hello&#8221;<\/p>\n<p>3) The client authenticates (if necessary) by logging in.<\/p>\n<p>4) Now it&#8217;s time to send an email.\u00a0 First, the client sends a &#8220;MAIL FROM&#8221; command with the email address that is the reverse-path.\u00a0 This is the email address that would receive a bounce or delivery status notification.<\/p>\n<p>5) The client then sends one or more &#8220;RCPT TO&#8221; commands, each with a recipient email address.\u00a0 It doesn&#8217;t matter if the recipient is a &#8220;To&#8221; , &#8220;CC&#8221;, or &#8220;BCC&#8221;, all recipient email addresses are passed to the SMTP server via &#8220;RCPT TO&#8221; commands.<\/p>\n<p>6) Finally, the MIME source of the email is sent with a &#8220;DATA&#8221; command.\u00a0\u00a0\u00a0 Note: The MIME source has header fields for &#8220;From&#8221;, &#8220;To&#8221;, and &#8220;CC&#8221;.\u00a0 These are the email addresses that will be seen by the receiver of the email.\u00a0 The actual recipients are the email addresses passed via the RCPT TO commands.\u00a0 It&#8217;s possible to create an email such that the &#8220;To&#8221; header field contains &#8220;santa.claus@northpole.com&#8221;, but you pass actual email addresses in the RCPT TO commands.\u00a0 The person receiving such an email (if not filtered as SPAM) would scratch his\/her head and wonder why he\/she received an email addressed to Santa Claus.<\/p>\n<p>The Chilkat mailman&#8217;s SendMime method has these arguments:\u00a0 From, CommaSeparatedRcptToEmailAddresses, MimeSource.\u00a0\u00a0\u00a0 Given the above explanation, it should be obvious how these arguments are used in sending the email&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question: SendMime requires a from \u00a0and \u00a0recipients address string, but the MIME message contains both .\u00a0 The message I receive from the SendMime seems to ignore the addresses in the call and uses the one in the MIME.\u00a0 So why require a from and recipient address? Answer: The SMTP protocol works like this: 1) A [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[426],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-smtp"],"_links":{"self":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":0,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}