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
this->AddReplyTo("$fromaddress", "$fromaname");
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->IsSMTP();
$mail->Host = "somehostcom";
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "some@email.com"; // SMTP username
$mail->Password = "somepassword"; // SMTP password
$mail->From = "some@email.com";
$mail->FromName = "$fromname";
$mail->AddAddress("$contactemail","$contactname");
$mail->AddReplyTo("$fromaddress", "$fromname");
of course in this scenario, the $mail would be replaced by $this.