From a6163888f3c56123b1db313743c6147ba498732c Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Fri, 8 Aug 2014 14:42:07 +0300 Subject: Add third_party libs --- third_party/uip-1.0/doc/html/a00161.html | 257 +++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 third_party/uip-1.0/doc/html/a00161.html (limited to 'third_party/uip-1.0/doc/html/a00161.html') diff --git a/third_party/uip-1.0/doc/html/a00161.html b/third_party/uip-1.0/doc/html/a00161.html new file mode 100644 index 0000000..74d2892 --- /dev/null +++ b/third_party/uip-1.0/doc/html/a00161.html @@ -0,0 +1,257 @@ + + +uIP 1.0: SMTP E-mail sender + + + + +
+
+

SMTP E-mail sender
+ +[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.h
 SMTP header file.
file  smtp.c
 SMTP example implementation.

Data Structures

struct  smtp_state

Defines

+#define SMTP_ERR_OK   0
 Error number that signifies a non-error condition.
+#define SMTP_SEND(to, cc, from, subject, msg)   smtp_send(to, cc, from, subject, msg, strlen(msg))
+#define ISO_nl   0x0a
+#define ISO_cr   0x0d
+#define ISO_period   0x2e
+#define ISO_2   0x32
+#define ISO_3   0x33
+#define ISO_4   0x34
+#define ISO_5   0x35

Functions

void smtp_done (unsigned char error)
 Callback function that is called when an e-mail transmission is done.
+void smtp_init (void)
+void smtp_appcall (void)
void smtp_configure (char *lhostname, void *server)
 Specificy an SMTP server and hostname.
unsigned char smtp_send (char *to, char *cc, char *from, char *subject, char *msg, u16_t msglen)
 Send an e-mail.
+


Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void smtp_configure ( char *  lhostname,
void *  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.
+
+ +

+Definition at line 216 of file smtp.c. +

+References uip_ipaddr_copy.

+

+ + + + +
+ + + + + + + + + +
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.
+
+
Examples:
+smtp.c, and smtp.h.
+

+Referenced by smtp_appcall().

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
unsigned char smtp_send ( char *  to,
char *  cc,
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.
cc The e-mail address of the CC: receivers 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.
+
+ +

+Definition at line 233 of file smtp.c. +

+References smtp_state::from, HTONS, smtp_state::msg, smtp_state::msglen, NULL, PSOCK_INIT, smtp_state::subject, smtp_state::to, and uip_connect().

+


Generated on Mon Jun 12 10:23:02 2006 for uIP 1.0 by  + +doxygen 1.4.6
+ + -- cgit v1.3.1