There is a php form in our website. After submitting the form, email will go to our company's email address (sample: support@company.com). Also, an issue is being created in Jira from that email/form. Those setting has been enabled already in jira. To send the email, an email of our company is to set in Form filed in the php. Without that gateway, message can't be send to our email address. So, the sample code is:
$fromName = $_POST['username'];
$fromEmail = $_POST['email'];
$mail->From = 'any@company.com';
$mail->FromName = 'Company';
$mail->addAddress('support@company.com', 'Company');
$mail->addReplyTo($fromEmail, $fromName);
$mail->Body = "<p>You have got a email from <b>{$fromName}<{$fromEmail}></b></p>";
$mail->Body .= "<p><b>The actual message is given bellow</b></p>";
The problem is, at jira, it says:
You have got a email from userName<user@gmail.com>
The actual message is given bellow
And it sets our email address (any@company.com which we set in $mail -> From) as reporter in stead of user's email (user@gmail.com, the email we collect by $fromEmail) for that issue. So, the problem is, when we reply at that issue, it goes to any@company.com instead of user's email address (user@gmail.com). How to fix this?