Customizing mail sending

Dotclear uses the PHP's default mail sending system. If it doesn't meet your needs or if you encounter issues (especially with antispam filters), you can configure Dotclear to use another system that will match your hosting provider's configuration more closely.

To do that, you should define a _mail function in your config.php file with the following signature:

function _mail($to,$subject,$message,$headers);

Within this function, you can implement mail sending just as you like.

For example, you can use a routine developed within Dotclear, which is slower than PHP's standard mail function but may prove more robust. This requires you to know the smtp relay used by your hosting provider. Please contact them to obtain this information.

Example of mail function implementation using Dotclear's internal routine:

function _mail($to,$subject,$message,$headers)
	socketMail::$smtp_relay = '';

You need to replace with the name of the machine used as smtp relay by your hosting provider. If you use a dedicated server, you may have already configured a local relay. If so, you simply need to specify 'localhost' as smtp relay.

You may also omit to specify an smtp relay, and the script itself will behave as a relay. This operation mode is not recommended

Wiki powered by Dokuwiki.