Consistency is king. Following the lead in everything curl.
Closes #8159
- authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9), Kerberos 5
(4) and External.
- - send e-mails
+ - send emails
- mail from support
- mail size support
- mail auth support for trusted server-to-server relaying
- authentication: Clear Text, APOP and SASL
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9),
Kerberos 5 (4) and External.
- - list e-mails
- - retrieve e-mails
+ - list emails
+ - retrieve emails
- enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
custom requests
- via http-proxy
Kerberos 5 (4) and External.
- list the folders of a mailbox
- select a mailbox with support for verifying the UIDVALIDITY
- - fetch e-mails with support for specifying the UID and SECTION
- - upload e-mails via the append command
+ - fetch emails with support for specifying the UID and SECTION
+ - upload emails via the append command
- enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
STORE, COPY and UID via custom requests
- via http-proxy
E-mail
======
- The e-mail related source code is in `lib/imap.c`, `lib/pop3.c` and
+ The email related source code is in `lib/imap.c`, `lib/pop3.c` and
`lib/smtp.c`.
<a name="general"></a>
6.4 Negotiate and Kerberos V5 need a fake user name
In order to get Negotiate (SPNEGO) authentication to work in HTTP or Kerberos
- V5 in the e-mail protocols, you need to provide a (fake) user name (this
+ V5 in the email protocols, you need to provide a (fake) user name (this
concerns both curl and the lib) because the code wrongly only considers
authentication if there's a user name provided by setting
conn->bits.user_passwd in url.c https://curl.se/bug/view.cgi?id=440 How?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
- Q: What is the most annoying thing in e-mail?
+ Q: What is the most annoying thing in email?
Apart from the screwed up read order (especially when mixed together in a
thread when someone responds using the mandated bottom-posting style), it
.br
- a multipart can be terminated with a '=)' argument.
-Example: the following command sends an SMTP mime e-mail consisting in an
+Example: the following command sends an SMTP mime email consisting in an
inline part in two alternative formats: plain text and HTML. It attaches a
text file:
Example: --mail-rcpt user@example.net smtp://example.com
See-also: mail-rcpt-allowfails
---
-Specify a single e-mail address, user name or mailing list name. Repeat this
+Specify a single email address, user name or mailing list name. Repeat this
option several times to send to multiple recipients.
When performing an address verification (VRFY command), the recipient should be
***************************************************************************/
/* <DESC>
- * IMAP example showing how to send e-mails
+ * IMAP example showing how to send emails
* </DESC>
*/
***************************************************************************/
/* <DESC>
- * IMAP example showing how to retreieve e-mails from a shared mailed box
+ * IMAP example showing how to retreieve emails from a shared mailed box
* </DESC>
*/
***************************************************************************/
/* <DESC>
- * IMAP example showing how to copy an e-mail from one folder to another
+ * IMAP example showing how to copy an email from one folder to another
* </DESC>
*/
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
***************************************************************************/
/* <DESC>
- * IMAP example showing how to retreieve e-mails
+ * IMAP example showing how to retreieve emails
* </DESC>
*/
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
***************************************************************************/
/* <DESC>
- * IMAP example showing how to search for new e-mails
+ * IMAP example showing how to search for new emails
* </DESC>
*/
***************************************************************************/
/* <DESC>
- * IMAP example showing how to modify the properties of an e-mail
+ * IMAP example showing how to modify the properties of an email
* </DESC>
*/
***************************************************************************/
/* <DESC>
- * POP3 example showing how to retrieve e-mails from a shared mailbox
+ * POP3 example showing how to retrieve emails from a shared mailbox
* </DESC>
*/
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
***************************************************************************/
/* <DESC>
- * POP3 example showing how to delete e-mails
+ * POP3 example showing how to delete emails
* </DESC>
*/
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
***************************************************************************/
/* <DESC>
- * POP3 example showing how to retrieve e-mails
+ * POP3 example showing how to retrieve emails
* </DESC>
*/
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
***************************************************************************/
/* <DESC>
- * POP3 example showing how to retrieve only the headers of an e-mail
+ * POP3 example showing how to retrieve only the headers of an email
* </DESC>
*/
***************************************************************************/
/* <DESC>
- * Send e-mail on behalf of another user with SMTP
+ * Send email on behalf of another user with SMTP
* </DESC>
*/
***************************************************************************/
/* <DESC>
- * SMTP example showing how to expand an e-mail mailing list
+ * SMTP example showing how to expand an email mailing list
* </DESC>
*/
#include <string.h>
#include <curl/curl.h>
-/* This is a simple example showing how to expand an e-mail mailing list.
+/* This is a simple example showing how to expand an email mailing list.
*
* Notes:
*
***************************************************************************/
/* <DESC>
- * Send e-mail with SMTP
+ * Send email with SMTP
* </DESC>
*/
***************************************************************************/
/* <DESC>
- * SMTP example showing how to send mime e-mails
+ * SMTP example showing how to send mime emails
* </DESC>
*/
};
static const char inline_text[] =
- "This is the inline text message of the e-mail.\r\n"
+ "This is the inline text message of the email.\r\n"
"\r\n"
- " It could be a lot of lines that would be displayed in an e-mail\r\n"
+ " It could be a lot of lines that would be displayed in an email\r\n"
"viewer that is not able to handle HTML.\r\n";
static const char inline_html[] =
"<html><body>\r\n"
- "<p>This is the inline <b>HTML</b> message of the e-mail.</p>"
+ "<p>This is the inline <b>HTML</b> message of the email.</p>"
"<br />\r\n"
"<p>It could be a lot of HTML data that would be displayed by "
- "e-mail viewers able to handle HTML.</p>"
+ "email viewers able to handle HTML.</p>"
"</body></html>\r\n";
mime = curl_mime_init(curl);
/* The inline part is an alternative proposing the html and the text
- versions of the e-mail. */
+ versions of the email. */
alt = curl_mime_init(curl);
/* HTML message. */
***************************************************************************/
/* <DESC>
- * SMTP example showing how to verify an e-mail address
+ * SMTP example showing how to verify an email address
* </DESC>
*/
#include <string.h>
#include <curl/curl.h>
-/* This is a simple example showing how to verify an e-mail address from an
+/* This is a simple example showing how to verify an email address from an
* SMTP server.
*
* Notes:
call.
Using a mime handle is the recommended way to post an HTTP form, format and
-send a multi-part e-mail with SMTP or upload such an e-mail to an IMAP server.
+send a multi-part email with SMTP or upload such an email to an IMAP server.
.SH EXAMPLE
.nf
CURL *easy = curl_easy_init();
.SH EXAMPLE
.nf
/* The inline part is an alternative proposing the html and the text
- versions of the e-mail. */
+ versions of the email. */
alt = curl_mime_init(curl);
/* HTML message. */
.SH "MIME API revisited for SMTP and IMAP"
In addition to support HTTP multi-part form fields, the MIME API can be used
-to build structured e-mail messages and send them via SMTP or append such
+to build structured email messages and send them via SMTP or append such
messages to IMAP directories.
-A structured e-mail message may contain several parts: some are displayed
+A structured email message may contain several parts: some are displayed
inline by the MUA, some are attachments. Parts can also be structured as
-multi-part, for example to include another e-mail message or to offer several
+multi-part, for example to include another email message or to offer several
text formats alternatives. This can be nested to any level.
To build such a message, you prepare the nth-level multi-part and then include
bound to its parent multi-part, a nth-level multi-part belongs to it and
should not be freed explicitly.
-E-mail messages data is not supposed to be non-ascii and line length is
-limited: fortunately, some transfer encodings are defined by the standards
-to support the transmission of such incompatible data. Function
+Email messages data is not supposed to be non-ascii and line length is
+limited: fortunately, some transfer encodings are defined by the standards to
+support the transmission of such incompatible data. Function
\fIcurl_mime_encoder(3)\fP tells a part that its source data must be encoded
before being sent. It also generates the corresponding header for that part.
-If the part data you want to send is already encoded in such a scheme,
-do not use this function (this would over-encode it), but explicitly set the
+If the part data you want to send is already encoded in such a scheme, do not
+use this function (this would over-encode it), but explicitly set the
corresponding part header.
Upon sending such a message, libcurl prepends it with the header list
set with \fICURLOPT_HTTPHEADER(3)\fP, as 0th-level mime part headers.
-Here is an example building an e-mail message with an inline plain/html text
+Here is an example building an email message with an inline plain/html text
alternative and a file attachment encoded in base64:
.nf
Pass a mime handle previously obtained from \fIcurl_mime_init(3)\fP.
This setting is supported by the HTTP protocol to post forms and by the
-SMTP and IMAP protocols to provide the e-mail data to send/upload.
+SMTP and IMAP protocols to provide the email data to send/upload.
This option is the preferred way of posting an HTTP form, replacing and
extending the deprecated \fICURLOPT_HTTPPOST(3)\fP option.
/* Do we have a continuation response? This should be a + symbol followed by
a space and optionally some text as per RFC-3501 for the AUTHENTICATE and
APPEND commands and as outlined in Section 4. Examples of RFC-4959 but
- some e-mail servers ignore this and only send a single + instead. */
+ some email servers ignore this and only send a single + instead. */
if(imap && !imap->custom && ((len == 3 && line[0] == '+') ||
(len >= 2 && !memcmp("+ ", line, 2)))) {
switch(imapc->state) {
/* Do we have a command response? This should be the response code followed
by a space and optionally some text as per RFC-5321 and as outlined in
- Section 4. Examples of RFC-4954 but some e-mail servers ignore this and
+ Section 4. Examples of RFC-4954 but some email servers ignore this and
only send the response code instead as per Section 4.2. */
if(line[3] == ' ' || len == 5) {
char tmpline[6];
body\r
</stdin>
<command>
-smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is the e-mail inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable' -F "=@log/test%TESTNUMBER.txt;encoder=base64" -H "From: different" -H "To: another"
+smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is the email inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable' -F "=@log/test%TESTNUMBER.txt;encoder=base64" -H "From: different" -H "To: another"
</command>
<file name="log/test%TESTNUMBER.txt">
This is an attached file.
Content-Transfer-Encoding: quoted-printable\r
Content-disposition: "inline"\r
\r
-This is the e-mail inline text with a very long line containing the special=\r
- character =3D and that should be split by encoder.\r
+This is the email inline text with a very long line containing the special =\r
+character =3D and that should be split by encoder.\r
------------------------------\r
Content-Disposition: attachment; filename="test%TESTNUMBER.txt"\r
Content-Transfer-Encoding: base64\r