I hacked a bit the plugin to make this work as I wanted to:
apply_filters('wp_email_send_pre', $mail, $post);
// Send The Mail if($mail->Send()) {
if($mail->Send()) {
I added a filter before sending so I can deal how I want.
Then I've plugged my hook on it:
add_filter('wp_email_send_pre', 'wp_email_authsmtp_fix', 10, 2);
function wp_email_authsmtp_fix($mail, $post)
{
$email_smtp = get_option('email_smtp');
foreach (array('yourname', 'youremail') as $arg)
{
$$arg = isset($_POST[$arg]) ? strip_tags(stripslashes(trim($_POST[$arg]))) : '';
}
$mail->AddReplyTo($youremail, $yourname);
$mail->Sender = $mail->From = $email_smtp['username'];
return $mail;
}