Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
smtp_client.h File Reference
SMTP client (Simple Mail Transfer Protocol) More...
Go to the source code of this file.
Data Structures | |
| struct | SmtpAuthInfo |
| Authentication information. More... | |
| struct | SmtpMailAddr |
| Mail address. More... | |
| struct | SmtpMail |
| Mail contents. More... | |
| struct | SmtpClientContext |
| SMTP client context. More... | |
Enumerations | |
| enum | SmtpRecipientType |
Recipient type. More... | |
Functions | |
| error_t | smtpSendMail (const SmtpAuthInfo *authInfo, const SmtpMail *mail) |
| Send a mail to the specified recipients. | |
| error_t | smtpEhloReplyCallback (SmtpClientContext *context, char_t *replyLine, uint_t replyCode) |
| Callback function to parse EHLO response. | |
| error_t | smtpSendAuthLogin (SmtpClientContext *context, const SmtpAuthInfo *authInfo) |
| Authentication using LOGIN mechanism. | |
| error_t | smtpSendAuthPlain (SmtpClientContext *context, const SmtpAuthInfo *authInfo) |
| Authentication using PLAIN mechanism. | |
| error_t | smtpSendAuthCramMd5 (SmtpClientContext *context, const SmtpAuthInfo *authInfo) |
| Authentication using CRAM-MD5 mechanism. | |
| error_t | smtpSendData (SmtpClientContext *context, const SmtpMail *mail) |
| Send message body. | |
| error_t | smtpSendCommand (SmtpClientContext *context, const char_t *command, uint_t *replyCode, SmtpReplyCallback callback) |
| Send SMTP command and wait for a reply. | |
| error_t | smtpWrite (SmtpClientContext *context, const void *data, size_t length, uint_t flags) |
| Send data to the SMTP server. | |
| error_t | smtpRead (SmtpClientContext *context, void *data, size_t size, size_t *received, uint_t flags) |
| Receive data from the SMTP server. | |
Detailed Description
SMTP client (Simple Mail Transfer Protocol)
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version:
- 1.7.6
Definition in file smtp_client.h.
Enumeration Type Documentation
| enum SmtpRecipientType |
Recipient type.
Definition at line 122 of file smtp_client.h.
Function Documentation
| error_t smtpEhloReplyCallback | ( | SmtpClientContext * | context, |
| char_t * | replyLine, | ||
| uint_t | replyCode | ||
| ) |
Callback function to parse EHLO response.
- Parameters:
-
[in] context SMTP client context [in] replyLine Response line [in] replyCode Response code
- Returns:
- Error code
Definition at line 430 of file smtp_client.c.
| error_t smtpRead | ( | SmtpClientContext * | context, |
| void * | data, | ||
| size_t | size, | ||
| size_t * | received, | ||
| uint_t | flags | ||
| ) |
Receive data from the SMTP server.
- Parameters:
-
[in] context SMTP client context [out] data Buffer into which received data will be placed [in] size Maximum number of bytes that can be received [out] received Actual number of bytes that have been received [in] flags Set of flags that influences the behavior of this function
- Returns:
- Error code
Definition at line 943 of file smtp_client.c.
| error_t smtpSendAuthCramMd5 | ( | SmtpClientContext * | context, |
| const SmtpAuthInfo * | authInfo | ||
| ) |
Authentication using CRAM-MD5 mechanism.
- Parameters:
-
[in] context SMTP client context [in] authInfo Authentication information
- Returns:
- Error code
Definition at line 603 of file smtp_client.c.
| error_t smtpSendAuthLogin | ( | SmtpClientContext * | context, |
| const SmtpAuthInfo * | authInfo | ||
| ) |
Authentication using LOGIN mechanism.
- Parameters:
-
[in] context SMTP client context [in] authInfo Authentication information
- Returns:
- Error code
Definition at line 493 of file smtp_client.c.
| error_t smtpSendAuthPlain | ( | SmtpClientContext * | context, |
| const SmtpAuthInfo * | authInfo | ||
| ) |
Authentication using PLAIN mechanism.
- Parameters:
-
[in] context SMTP client context [in] authInfo Authentication information
- Returns:
- Error code
Definition at line 555 of file smtp_client.c.
| error_t smtpSendCommand | ( | SmtpClientContext * | context, |
| const char_t * | command, | ||
| uint_t * | replyCode, | ||
| SmtpReplyCallback | callback | ||
| ) |
Send SMTP command and wait for a reply.
- Parameters:
-
[in] context SMTP client context [in] command Command line [out] replyCode SMTP server reply code [in] callback Optional callback to parse each line of the reply
- Returns:
- Error code
Definition at line 835 of file smtp_client.c.
| error_t smtpSendData | ( | SmtpClientContext * | context, |
| const SmtpMail * | |||
| ) |
Send message body.
- Parameters:
-
[in] context SMTP client context [in] mail Mail contents
- Returns:
- Error code
Definition at line 696 of file smtp_client.c.
| error_t smtpSendMail | ( | const SmtpAuthInfo * | authInfo, |
| const SmtpMail * | |||
| ) |
Send a mail to the specified recipients.
- Parameters:
-
[in] authInfo Authentication information [in] mail Mail contents
- Returns:
- Error code
Definition at line 61 of file smtp_client.c.
| error_t smtpWrite | ( | SmtpClientContext * | context, |
| const void * | data, | ||
| size_t | length, | ||
| uint_t | flags | ||
| ) |
Send data to the SMTP server.
- Parameters:
-
[in] context SMTP client context [in] data Pointer to a buffer containing the data to be transmitted [in] length Number of bytes to be transmitted [in] flags Set of flags that influences the behavior of this function
Definition at line 915 of file smtp_client.c.
Generated on Tue Jul 12 2022 17:10:22 by
1.7.2