data Function

Syntax

Parameters

Table 82-13 data Function Parameters

Parameter

Description

c (IN OUT NOCOPY)

The SMTP Connection.

body (IN OUT NOCOPY)

The text of the message to be sent, including headers, in [RFC822] format.

Usage Notes

The application must ensure that the contents of the body parameter conform to the MIME(RFC822) specification. The data() routine will terminate the message with a <CR><LF>.<CR><LF> sequence (a single period at the beginning of a line), as required by RFC821. It will also translate any sequence of <CR><LF>.<CR><LF> (single period) in body to <CR><LF>..<CR><LF> (double period). This conversion provides the transparency as described in Section 4.5.2 of RFC821.

The data() call should be called only after open_connection(), helo() / ehlo(), mail() and rcpt() have been called. The connection to the SMTP server must be open, and a mail transaction must be active when this routine is called.

The expected response from the server is a message beginning with status code 250. The 354 response received from the initial DATA command will not be returned to the caller.