You can change the default configuration of OssnMail. OssnMail uses phpmailer so you can add paramaters from phpmailer. One of the example for this is SMTP component.

~~~
<?php
function ossn_com_smtp_init() {
ossn_add_hook('email', 'config', 'ossn_smtp', 1);
}
function ossn_smtp($hook, $type, $mail, $return) {
//$mail contain the default phpmailer/OssnMail object
$mail->IsSMTP();
$mail->SMTPAuth = true;
//$mail->SMTPDebug = false;

$mail->Host = 'host';
$mail->Port = 'port';
$mail->Username = 'username';
$mail->Password = 'password';
$mail->SMTPSecure = true;
return $mail;
}
ossn_register_callback('ossn', 'init', 'ossn_com_smtp_init');
~~~

One other usecase is sending HTML emails

~~~
<?php
function ossn_com_mail_init() {
ossn_add_hook('email', 'config', 'ossn_html_emails', 1);
}
function ossn_html_emails($hook, $type, $mail, $return) {
//$mail contain the default phpmailer/OssnMail object
$mail->isHTML(true)
return $mail;
}
ossn_register_callback('ossn', 'init', 'ossn_com_mail_init');
~~~

Mail configuration