Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Protocols
Protocols.SMTP
Protocols.SMTP.Client

Method Protocols.SMTP.Client()->create()


Method create

void Protocols.SMTP.Client()
void Protocols.SMTP.Client(Stdio.File server)
void Protocols.SMTP.Client(string server, void|int port)

Description

Creates an SMTP mail client and connects it to the the server provided. The server parameter may either be a string witht the hostnam of the mail server, or it may be a file object acting as a mail server. If server is a string, than an optional port parameter may be provided. If no port parameter is provided, port 25 is assumed. If no parameters at all is provided the client will look up the mail host by searching for the DNS MX record.

Throws

Throws an exception if the client fails to connect to the mail server.