tumblr tracker

CreateSmtpClient

Library Reference ›› Email ››
Parent Previous Next

Email.CreateSmtpClient


Namespace: Email


Connects to an SMTP server and creates an SMTP client handle that can be used to send emails through that SMTP server.


retval = Email.CreateSmtpClient(MailHost, [Port], [UserName], [Password])


Parameters:

- MailHost; a string constant or variable containing SMTP server host name or IP address

- [Port]; optional; a numeric constant or variable defining the SMTP port to connect to; default is 25

- [UserName]; optional; a string constant or variable; if omitted it means that no logging is required

- [Password]; optional; a string constant or variable; password for the [UserName];


Returns:

SMTP client handle; handle value.


Example


$SmtpClient = Email.CreateSmtpClient("mail.somedomain.com", 25, "someuser@somedomain.com", "somepassword");