misc: s/e-mail/email
Consistency is king. Following the lead in everything curl. Closes #8159
This commit is contained in:
Родитель
b29af4a406
Коммит
7a92f865b4
|
@ -147,7 +147,7 @@
|
|||
|
||||
- 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
|
||||
|
@ -165,8 +165,8 @@
|
|||
- 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
|
||||
|
@ -184,8 +184,8 @@
|
|||
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
|
||||
|
|
|
@ -357,7 +357,7 @@ LDAP
|
|||
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>
|
||||
|
|
|
@ -570,7 +570,7 @@ problems may have been fixed or changed somewhat since this was written.
|
|||
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?
|
||||
|
|
|
@ -225,7 +225,7 @@ MAIL ETIQUETTE
|
|||
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
|
||||
|
|
|
@ -107,7 +107,7 @@ followed by a content type specification.
|
|||
.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:
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Category: smtp
|
|||
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
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to send e-mails
|
||||
* IMAP example showing how to send emails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <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>
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <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>
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* 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
|
||||
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to retreieve e-mails
|
||||
* IMAP example showing how to retreieve emails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* 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
|
||||
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to search for new e-mails
|
||||
* IMAP example showing how to search for new emails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <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>
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <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>
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* 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
|
||||
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example showing how to delete e-mails
|
||||
* POP3 example showing how to delete emails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* 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
|
||||
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example showing how to retrieve e-mails
|
||||
* POP3 example showing how to retrieve emails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* 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
|
||||
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <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>
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* Send e-mail on behalf of another user with SMTP
|
||||
* Send email on behalf of another user with SMTP
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example showing how to expand an e-mail mailing list
|
||||
* SMTP example showing how to expand an email mailing list
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
#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:
|
||||
*
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* Send e-mail with SMTP
|
||||
* Send email with SMTP
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example showing how to send mime e-mails
|
||||
* SMTP example showing how to send mime emails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
@ -52,17 +52,17 @@ static const char *headers_text[] = {
|
|||
};
|
||||
|
||||
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";
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ int main(void)
|
|||
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. */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example showing how to verify an e-mail address
|
||||
* SMTP example showing how to verify an email address
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
#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:
|
||||
|
|
|
@ -36,7 +36,7 @@ using option \fICURLOPT_MIMEPOST(3)\fP within a \fIcurl_easy_setopt(3)\fP
|
|||
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();
|
||||
|
|
|
@ -45,7 +45,7 @@ is retained. It is possible to unassign previous part's contents by setting
|
|||
.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. */
|
||||
|
|
|
@ -1188,12 +1188,12 @@ this behavior by setting \fICURLOPT_FTP_USE_EPRT(3)\fP to zero.
|
|||
|
||||
.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
|
||||
|
@ -1202,19 +1202,19 @@ it as a source to the parent multi-part using function
|
|||
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
|
||||
|
|
|
@ -34,7 +34,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MIMEPOST, mime);
|
|||
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.
|
||||
|
|
|
@ -329,7 +329,7 @@ static bool imap_endofresp(struct Curl_easy *data, struct connectdata *conn,
|
|||
/* 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) {
|
||||
|
|
|
@ -222,7 +222,7 @@ static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
|
|||
|
||||
/* 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];
|
||||
|
|
|
@ -27,7 +27,7 @@ To: another
|
|||
body
|
||||
</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.
|
||||
|
@ -60,8 +60,8 @@ To: another
|
|||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-disposition: "inline"
|
||||
|
||||
This is the e-mail inline text with a very long line containing the special=
|
||||
character =3D and that should be split by encoder.
|
||||
This is the email inline text with a very long line containing the special =
|
||||
character =3D and that should be split by encoder.
|
||||
------------------------------
|
||||
Content-Disposition: attachment; filename="test%TESTNUMBER.txt"
|
||||
Content-Transfer-Encoding: base64
|
||||
|
|
Загрузка…
Ссылка в новой задаче