SMTP_Connect
<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > SMTP > SMTP_Connect |
Description
Establishes a connection with a SMTP server.
Syntax
ErrorCode = SMTP_Connect( Server, From [, ReplyTo] )
Returns
Number.
If ErrorCode < 0 (Zero) means failure. Use SMTP_GetError to return error description of error code.
Parameters
Name |
Type |
Optional |
Meaning |
Server |
String |
No |
Your SMTP server name. It is typically named "mail.XXX.com" where XXX can be found in your email address, such as name@XXX.com. Your SMTP server name can also be found in the setup information for your normal email client. The SMTP server name can also be specified in dotted decimal notation. For example "10.23.231.1". |
From |
String |
No |
The 'From' string is required and must be enclosed in "<>" brackets, such as "<yourname@yourdomain.com>". |
ReplyTo |
String |
Yes |
The 'ReplyTo' string is optional and is used for the "Reply-To:" header line. If used, the email address must be enclosed in "<>" brackets. |
Remarks
Restrictions
See also
Examples