I'm trying to use php mail class as shown in the example.
I'm using it my site's contact us form. Can I set the "$mail->From" address as the person who filled the form? When i reveive the mail it always shows that the "from address" as my gmail account. Any help would really helpful.
$mail = new PHPGMailer();
$mail->Username = 'firstname.lastname@example.org';
$mail->Password = 'gmailpassword';
$mail->From = 'email@example.com'; // Like to set this address as the address of the person who filled the form
$mail->FromName = 'User Name';
$mail->Subject = 'Subject';
$mail->AddAddress('firstname.lastname@example.org'); // To which address the mail to be delivered
$mail->Body = 'Hey buddy, heres an email!';