Hello i am trying to build an email class in which the user can send html mail. The user must be able to set the To:, Cc:, Bcc:, From:. Everything works except from. The From Name changes but the email does not.
The addFrom Function:
public function addFrom($from, $name = 'Test Email'){
$this->_headers .= "From: " . $name ." ". strip_tags($from) . "" . PHP_EOL;
}
In Gmail i see this:
Even though when i call the addFrom Method i set:
$mail->addFrom('dotpass@hotmail.com');
I also tried adding the <> around the from in the function but no email show up.
I also print_r my headers:
How can i set the from to change? I am running this on localhost.