I'm using the following script to send out mails with php
$status = $_POST['status'];
$subject = $_POST['subject'];
$from = "info@example.com";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= "From: $from\r\n";
$recipment = $_POST['to'];
if (mail($emailTo, $subject, $body, $headers)){
return 'Email sent!';
}
I would like save a copy of all outgoing mails to the used accounts outbox. Which php mailer functions are available to achieve this.