Location: PHPKode > projects > EXtensible Production Suite (XPS) > xpsdev/helpers/xpm3/DOCUMENTATION/mail/relay.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
body, pre {
	font-family: Verdana;
	font-size: 10pt;
<body bgcolor="#f1f3f5" topmargin="10" leftmargin="14">

XPM3_MAIL -> <i>boolean</i> <b>relay</b> ( <i>string</i> address [, <i>string</i> username [, <i>string</i> password [, <i>integer</i> port [, <i>mixed</i> ssl [, <i>integer</i> timeout ]]]]] )
Returns TRUE if has been successfully set, FALSE if not.

Open connection to relay mail server (MTA).

Default values are:
<i>integer</i> port: 25
<i>mixed</i> ssl: <i>boolean</i> false
<i>integer</i> timeout: 30

<i>mixed</i> ssl possible values are: <i>boolean</i> false, true; <i>string</i> tls, ssl, sslv2, sslv3

<i>Notice</i>: <i>string</i> address can have hostname or IPv4 value.
The standard port values are: 25 - default, and 465 - SSL (secure).

<table border="0" bgcolor="white">
$m = new XPM3_MAIL;

// set mail delivery to "relay"

// set relay connection parameters via port 465 secure TLS and 10 secounds timeout
$r = $m->Relay('relay.hostname.tld', 'username', 'password', 465, 'tls', 10);

// print result(s)
if ($r) echo 'Success!'; // if relay connection was successfully set
else print_r($m->result); // if an error occured

<hr color="white">

[ <a style="color: blue; text-decoration: none" href="mailto:hide@address.com?subject=Comment XPM3_MAIL Relay">Comments</a> ]

Last update: Monday, December 11, 2006


Return current item: EXtensible Production Suite (XPS)