SMTP_POINTERS Structure

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
SMTP_POINTERS Structure
C
typedef struct {
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } Server;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } Username;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } Password;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } To;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } CC;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } BCC;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } From;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } Subject;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } OtherHeaders;
  union {
    BYTE * szRAM;
    ROM BYTE * szROM;
  } Body;
  struct {
    unsigned char Server : 1;
    unsigned char Username : 1;
    unsigned char Password : 1;
    unsigned char To : 1;
    unsigned char CC : 1;
    unsigned char BCC : 1;
    unsigned char From : 1;
    unsigned char Subject : 1;
    unsigned char OtherHeaders : 1;
    unsigned char Body : 1;
  } ROMPointers;
  BOOL UseSSL;
  WORD ServerPort;
} SMTP_POINTERS;
Description

This structure of pointers configures the SMTP Client to send an e-mail message. Initially, all pointers will be null. Set SMTPClient.[field name].szRAM to use a string stored in RAM, or SMTPClient.[field name].szROM to use a string stored in ROM. (Where [field name] is one of the parameters below.) 

If a ROM string is specified, SMTPClient.ROMPointers.[field name] must also be set to 1 to indicate that this field should be retrieved from ROM instead of RAM.

Parameters
Parameters 
Description 
Server 
the SMTP server to relay the message through 
Username 
the user name to use when logging into the SMTP server, if any is required 
Password 
the password to supply when logging in, if any is required 
To 
the destination address for this message. May be a comma-separated list of addresss, and/or formatted. 
CC 
The CC addresses for this message, if any. May be a comma-separated list of addresss, and/or formatted. 
BCC 
The BCC addresses for this message, if any. May be a comma-separated list of addresss, and/or formatted. 
From 
The From address for this message. May be formatted. 
Subject 
The Subject header for this message. 
OtherHeaders 
Any additional headers for this message. Each additional header, including the last one, must be terminated with a CRLF pair. 
Body 
When sending a message from memory, the location of the body of this message in memory. Leave as NULL to build a message on-the-fly. 
ROMPointers 
Indicates which parameters to read from ROM instead of RAM. 
UseSSL 
When STACK_USE_SSL_CLIENT is enabled, this flag causes the SMTP client to make an SSL connection to the server. 
(WORD value) Indicates the port on which to connect to the remote SMTP server. 
Remarks

When formatting an e-mail address, the SMTP standard format for associating a printable name may be used. This format places the printable name in quotation marks, with the address following in pointed brackets, such as "John Smith" <[email protected]>

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.