server() method is used to load the default setup either as an array or a file.
$webmail within a file and using the setup() to load that file.
The method accepts the filename or file path by using the dot convention. for example, a file path of
mail/setup.php will be supplied as mail.setup . This makes it easier to load the server
default headers.
Sample: Setup File Configuration (setup.php)
<?php
// default configuration settings for mail
$webmail['site']['mail'] = 'info@site.com'; // website mail e.g info@site.com
$webmail['site']['name'] = 'website'; // mail header name or site name
//default content settings - should be set later
$webmail['header'] = ''; // optional - mail title e.g Welcome to ...
$webmail['body'] = ''; // optional - mail content string or file
//default user details - should be set later
$webmail['client']['mail'] = ''; // optional- user email
$webmail['client']['name'] = ''; // optional- user name
Sample: Loading Server File
<?php
$mailer = new Mailer;
$mailer->server('server'); // e.g server.php
sync() method. This method is used to modify default
configurations on the go before forwarding the message. This is discussed
here .