smtpc.h File Reference

SMTP client functions. More...

Go to the source code of this file.

Data Structures

struct  MAILENVELOPE
 Mail envelope structure type. More...
struct  SMTPCLIENTSESSION
 SMTP session structure type. More...

Defines

#define SMTP_BUFSIZ   256
 Size of the SMTP buffer.

Functions

SMTPCLIENTSESSIONNutSmtpConnect (uint32_t ip, uint16_t port)
 Start an SMTP session.
void NutSmtpDisconnect (SMTPCLIENTSESSION *si)
 Terminate an SMTP session.
int NutSmtpLogin (SMTPCLIENTSESSION *si, char *host, char *user, char *pass)
 Identify the client SMTP to the server.
CONST char * NutSmtpSendMail (SMTPCLIENTSESSION *si, MAILENVELOPE *me)
 Send an email via an active SMTP session.
int NutSmtpSendMailRequest (SMTPCLIENTSESSION *si, MAILENVELOPE *me)
 Send mail request.
int NutSmtpSendMailHeader (SMTPCLIENTSESSION *si, MAILENVELOPE *me)
 Send major mail header lines.
int NutSmtpSendEncodedLines (SMTPCLIENTSESSION *si, CONST char *text)
 Send encoded email text lines.
CONST char * NutSmtpSendCommand (SMTPCLIENTSESSION *si, CONST char *fmt,...)
 Send command to the server and return the first response line.
CONST char * NutSmtpReceiveResponse (SMTPCLIENTSESSION *si)
 Read a response line from the server.

Recipient Status Bits

Maximum number of recipients.



#define MAIL_RCPT_TYPE   0x03
 Recipient type mask.
#define MAIL_RCPT_TO   0x01
 Standard recipient type.
#define MAIL_RCPT_CC   0x02
 Carbon copy recipient type.
#define MAIL_RCPT_BCC   0x03
 Blind carbon copy recipient type.
#define MAIL_RCPT_ACPT   0x20
 Recipient accepted flag.
#define MAIL_RCPT_SENT   0x40
 Recipient processed flag.
#define MAIL_RCPT_FAIL   0x80
 Recipient failed flag.
#define MAIL_RCPT_DONE   (MAIL_RCPT_SENT | MAIL_RCPT_FAIL)
 Recipient done mask.

Server Features



#define SMTPFEAT_VINTAGE   0x00000001
 Server doesn't support ESMTP.
#define SMTPFEAT_AUTH_LOGIN   0x00000002
 Server supports LOGIN authentication.
#define SMTPFEAT_AUTH_PLAIN   0x00000004
 Server supports PLAIN authentication.

Detailed Description

SMTP client functions.

 * $Id$
 * 

Definition in file smtpc.h.


© 2000-2010 by contributors - visit http://www.ethernut.de/