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

<pre>
XPM3_MAIL -> <i>boolean</i> <b>delivery</b> ( <i>string</i> connection_type )
<hr>
Returns TRUE if the server connection type has been successfully set, FALSE if not.

If mail delivery is not set using this function, then "local" connection type is used by default.

<i>string</i> connection_type possible values are: <b>local</b>, <b>client</b>, <b>relay</b>, and including combinations with this three values separated by middle line.
If you write multiple connections separated by middle line, second connection (afther middle line), will be used only if previous connection has fail.

Description of connection type:
 <b>local</b> - use mail() function from php (with mail settings from php.ini), and if fail, will send e-mail to 127.0.0.1 (localhost) at port 25.
 <b>client</b> - send the e-mail directly to the client (MX zone) mail server.
 <b>relay</b> - use a relay mail server to send the e-mail, for this, you must set relay hostname with "Relay()" function and optionaly you can set username and password autentication.

Example:
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
$m = new XPM3_MAIL;

$m->Delivery('local-relay-client');

// if delivery relay is in use, then you must set the relay connection parameters
$m->Relay('relay.domain.tld', 'username', 'password');
</code></pre>
</td></tr>
</table>

Example how to send an e-mail directly to localhost without autentication:
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
$m = new XPM3_MAIL;

$m->Delivery('relay');

$m->Relay('127.0.0.1');
</code></pre>
</td></tr>
</table>

<hr color="white">

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

Last update: Friday, December 08, 2006

</pre>

</body>
</html>
Return current item: EXtensible Production Suite (XPS)