Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

SMTP E-mail sender
[Example applications]


Detailed Description

The Simple Mail Transfer Protocol (SMTP) as defined by RFC821 is the standard way of sending and transfering e-mail on the Internet. This simple example implementation is intended as an example of how to implement protocols in uIP, and is able to send out e-mail but has not been extensively tested.


Files

file  smtp.c
 SMTP example implementation.

file  smtp.h
 SMTP header file.


Defines

#define SMTP_ERR_OK   0
 Error number that signifies a non-error condition.


Functions

void smtp_done (unsigned char error)
 Callback function that is called when an e-mail transmission is done.

void smtp_configure (char *localhostname, u16_t *smtpserver)
 Specificy an SMTP server and hostname.

unsigned char smtp_send (char *to, char *from, char *subject, char *msg, u16_t msglen)
 Send an e-mail.


Function Documentation

void smtp_configure char *  lhostname,
u16_t server
 

Specificy an SMTP server and hostname.

This function is used to configure the SMTP module with an SMTP server and the hostname of the host.

Parameters:
lhostname The hostname of the uIP host.
server A pointer to a 4-byte array representing the IP address of the SMTP server to be configured.

void smtp_done unsigned char  error  ) 
 

Callback function that is called when an e-mail transmission is done.

This function must be implemented by the module that uses the SMTP module.

Parameters:
error The number of the error if an error occured, or SMTP_ERR_OK.

unsigned char smtp_send char *  to,
char *  from,
char *  subject,
char *  msg,
u16_t  msglen
 

Send an e-mail.

Parameters:
to The e-mail address of the receiver of the e-mail.
from The e-mail address of the sender of the e-mail.
subject The subject of the e-mail.
msg The actual e-mail message.
msglen The length of the e-mail message.

Here is the call graph for this function:


Generated on Tue Oct 7 15:51:47 2003 for uIP 0.9 by doxygen 1.3.3