How to create issue from email/webpage form?

There is a php form in our website. After submitting the form, email will go to our company's email address (sample: 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 = '';
$mail->FromName = 'Company';
$mail->addAddress('', 'Company');
$mail->addReplyTo($fromEmail, $fromName);
$mail->Body    = "<p>You have got a email from <b>{$fromName}&lt;{$fromEmail}&gt;</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<>

The actual message is given bellow

And it sets  our email address ( which we set in $mail -> From) as reporter in stead of user's email (, the email we collect by $fromEmail)  for that issue. So, the problem is, when we reply at that issue, it goes to instead of user's email address ( How to fix this?

1 answer

Tarun Sapra Community Champion Dec 20, 2017

Is the user's email actually mentioned in the "from" mail section in your company mailbox which the JIRA reads, can you confirm that

Tarun Sapra Community Champion Dec 20, 2017

Also from the official docs, this is what is supported, without requiring the plugin. You have to use it while configuring the mail handler

Default Reporter
Specify the username of a default reporter, which will be used if the email address in the From: field of any received messages does not match the address associated with that of an existing JIRA user — for example, a JIRA username such as emailed-reporter

(info) Note:

This option is not available if the Create Users checkbox is selected.
Please ensure that the user specified in this field has the Create I ssues project permission for the relevant Project (specified above) as well as the Create Comments project permission for the other relevant projects to which this mail handler should add comments.
When an issue is created and this option is specified, the email message's From: field address is appended in a brief message at the end of the issue's Description field, so that the sender can be identified.

Thanks for your response. I don't have access to the company mailbox right now. I see all the messages at jira issue collector. I'll try to access the mailbox directly and confirm. By the way, for sending the message from website, phpMailer has been used: 

I haven't found any installed plugin for email handling. That means, it was configured without plugin probably.


By the way, here is the configuration what I have found in jira:


Screenshot from 2017-12-20 18-41-46.pngScreenshot from 2017-12-20 18-45-55.pngScreenshot from 2017-12-20 18-47-51.png

Tarun Sapra Community Champion Dec 20, 2017

As mentioned in the configuration "You haven't provided default reporter" , thus if the "from" email address is not mapped to any username then it will be ignored. Thus, your company address is mapped to some username which becomes the default repoter.

okay, but I don't want to set any default reporter. I want sender's email address as reporter. Sender can be new or any existing jira user. I want it to generate from the input of the form.

$fromEmail = $_POST['email'];

 What should I do then?

By the way, I've tried with checking Create Users checkbox. still no change!


Screenshot from 2017-12-21 18-05-03.png

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,111 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you