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 = 'email@example.com';
$mail->Password = 'gmailpassword';
$mail->From = 'firstname.lastname@example.org'; // Like to set this address as the address of the person who filled the form
$mail->FromName = 'User Name';
$mail->Subject = 'Subject';
$mail->AddAddress('email@example.com'); // To which address the mail to be delivered
$mail->Body = 'Hey buddy, heres an email!';