From 238a8fac5f01850385c82b107344eff98f3d24b8 Mon Sep 17 00:00:00 2001
From: Brad Hards <bradh@frogmouth.net>
Date: Sat, 18 Dec 2010 09:44:57 +1100
Subject: [PATCH 1/3] Minor updates to complete simple SMTP examples.

---
 docs/examples/.gitignore |    3 +++
 docs/examples/smtp-tls.c |   23 ++++++++++++-----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore
index 3acd509..8836a7b 100644
--- a/docs/examples/.gitignore
+++ b/docs/examples/.gitignore
@@ -29,4 +29,7 @@ sendrecv
 sepheaders
 simple
 simplepost
+simplesmtp
 simplessl
+smtp-multi
+smtp-tls
diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c
index 58719ad..212d76e 100644
--- a/docs/examples/smtp-tls.c
+++ b/docs/examples/smtp-tls.c
@@ -11,20 +11,21 @@
 #include <string.h>
 #include <curl/curl.h>
 
-/* This is a simple example showing how to send mail using libcurl's SMTP
- * capabilities. It builds on the simplesmtp.c example, adding some
+/* This is a simple example showing how to send mail using libcurl's SMTP 
+ * capabilities. It builds on the simplesmtp.c example, adding some 
  * authentication and transport security.
  */
 
-#define FROM    "sender@example.org"
-#define TO      "addressee@example.net"
-#define CC      "info@example.org"
+#define FROM	"sender@example.org"
+#define TO 	"addressee@example.net"
+#define CC	"info@example.org"
 
 static const char *payload_text[]={
   "Date: Mon, 29 Nov 2010 21:54:29 +1100\n",
   "To: " TO "\n",
   "From: " FROM "(Example User)\n",
-  "Cc: " CC "(Another example User)\n"
+  "Cc: " CC "(Another example User)\n",
+  "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>",
   "Subject: SMTP TLS example message\n",
   "\n", /* empty line to divide headers from body, see RFC5322 */
   "The body of the message starts here.\n",
@@ -70,8 +71,8 @@ int main(void)
 
   curl = curl_easy_init();
   if (curl) {
-    /* This is the URL for your mailserver. Note the use of port 587 here,
-     * instead of the normal SMTP port (25). Port 587 is commonly used for
+    /* This is the URL for your mailserver. Note the use of port 587 here, 
+     * instead of the normal SMTP port (25). Port 587 is commonly used for 
      * secure mail submission (see RFC4403), but you should use whatever
      * matches your server configuration. */
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
@@ -82,7 +83,7 @@ int main(void)
      * will continue anyway - see the security discussion in the libcurl
      * tutorial for more details. */
     curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
-
+ 
     /* If your server doesn't have a valid certificate, then you can disable
      * part of the Transport Layer Security protection by setting the
      * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
@@ -102,10 +103,10 @@ int main(void)
      * on the network. Here is how the user name and password are provided: */
     curl_easy_setopt(curl, CURLOPT_USERNAME, "user@example.net");
     curl_easy_setopt(curl, CURLOPT_PASSWORD, "P@ssw0rd");
-
+    
     /* value for envelope reverse-path */
     curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
-    /* Add two recipients, in this particular case they correspond to the
+    /* Add two recipients, in this particular case they correspond to the 
      * To: and Cc: addressees in the header, but they could be any kind of
      * recipient. */
     recipients = curl_slist_append(recipients, TO);
-- 
1.7.1


