Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Connect to a SMTP server.

Files

smtp-c.h/smtp-c.c

Prototype

 

NET_SOCK_ID SMTPc_Connect (CPU_CHAR                *p_host_name,
						   CPU_INT16U               port,
 						   CPU_CHAR                *p_username,
						   CPU_CHAR                *p_pwd,
 						   NET_APP_SOCK_SECURE_CFG *p_secure_cfg,
 						   SMTPc_ERR               *p_err);

 

Arguments

p_host_name         Pointer to host name of the SMTP server to contact. Can be also an IP address.

port                         TCP port to use, or '0' if SMTPc_DFLT_PORT.

p_username           Pointer to user name, if authentication enabled.

p_pwd                     Pointer to password, if authentication enabled.

p_secure_cfg         Pointer to the secure configuration (TLS/SSL).

p_err                       Pointer to variable that will receive the return error code from this function.

Returned Values

If the connect operation with the SMTP server is successful, the function will return the Socket descriptor/handle identifier associated to this connection.

If the connect operation with the SMTP server is unsuccessful, the function will return -1.

Required Configuration

Module Configuration.

Notes / Warnings

To resolve the SMTP server adress with it name domain, be sure that µC/DNSc has been correctly initialized.  

Example Usage

none.

 

  • No labels