I was running into the same problems and looked into all sorts of fixes.
I was pulling the from address from a database and that from address was not an address on the server. Therefore there was a security issue that was not allowing the phpmailer function to work, and giving the error message in question.
What I found if the following:
The From address should be the email address you are using for the smtp authentication.
You can use
to set the reply to address to whatever address you like, particularly the person sending the email.
The complete function looked like this:
$mail = new PHPMailer();
$mail->Host = "somehostcom";
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "firstname.lastname@example.org"; // SMTP username
$mail->Password = "somepassword"; // SMTP password
$mail->From = "email@example.com";
$mail->FromName = "$fromname";
of course in this scenario, the $mail would be replaced by $this.