Issue not created

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Issue not created

Post by Mophilly »

Plugin: 0.10.1
MantisBT: 2.17.0
PHP 7.1, as part of software collections

I have set up two mailboxes. One is for testing and one is the first of four production form/mailbox combos, being test_mantis_email_reporting and prod_1.

The "test" indicates the email settings are correct, but I did not see an email in the mail user account I set up to send the email to the Mantis installation.

'Test complete' does not result in a new issue being created.

What is perplexing, the 'test complete' on test_mantis_email_reporting worked once, before I set up the second mailbox. Since then, neither work.

What/where should I be looking?
Starbuck
Posts: 219
Joined: 14 Feb 2006, 02:53
Location: USA
Contact:

Re: Issue not created

Post by Starbuck »

Look in Omnis Studio > Options > Mantis EmailReporting...

Just kidding, inside joke, greetings old friend.
Tony G. / Pick Systems
If you want Mantis to work differently, use or create a plugin. Visit the Plugins forums.
Ask developers to create a plugin that you need - and motivate them to help you!
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: Issue not created

Post by Mophilly »

Starbuck wrote: 14 Dec 2018, 22:24 Just kidding, inside joke, greetings old friend.
Tony G. / Pick Systems
LOL, thanks for the chuckle. Nice to see a post from you. Hope you and yours are healthy and happy!
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Issue not created

Post by SL-Gundam »

Since no error is apparently returned everything should work properly.

Based on that assumption it could be following
  1. Verify the mailbox in question is enabled
  2. Are these IMAP mailboxes or POP3? If it is IMAP i suggest you verify the following 2 settings
    http://www.mantisbt.org/wiki/doku.php/m ... basefolder
    http://www.mantisbt.org/wiki/doku.php/m ... rstructure
  3. Verify that there is an email to process for EmailReporting. This email should have the unread state for POP3 and not be marked for deletion incase of IMAP
If the above three don't result in a solution, do the following
  1. Enable debug mode
  2. Run a complete test of a mailbox (preferably both)
  3. Post the output to this forum thread (mask the passwords if needed)
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: Issue not created

Post by Mophilly »

Thank you, SL-Gundam, for your suggestions and for maintaining the plugin.

In reviewing the two URL you provided, it occurred to me that I may not clearly understand the overall arrangement. Here is what I have:

Mantis Project: Test Email Reporting
Email Address: test_mantis_email_reporting@mydomain.com
MantisBT user: test_mantis_email_reporting (Reporter)

Mantis Project: prod_1
Email: prod_1_reporter@mydomain.com
MantisBT user: prod_1_reporter (Reporter)

So, for each Mantis project to receive email submissions, there is one unique MantisBT user account and one unique email address. Each MantisBT user is related to the project, as a developer would but with Report role only.

Is this the correct approach?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Issue not created

Post by SL-Gundam »

You can only configure one Reporter user in EmailReporting for your entire MantisBT instance
http://www.mantisbt.org/wiki/doku.php/m ... eporter_id

Usually you would want the sender of the email to be the reporter so this would only be a fallback Reporter when the sender cannot be set as the Reporter
http://www.mantisbt.org/wiki/doku.php/m ... uto_signup
http://www.mantisbt.org/wiki/doku.php/m ... e_reporter
http://www.mantisbt.org/wiki/doku.php/m ... l_reporter

I suggest using one single user with global reporter access and setting that as the Default/fallback reporter user
http://www.mantisbt.org/wiki/doku.php/m ... eporter_id

There is no direct relation between one EmailReporting mailbox and a user.

When an incoming email is recognised as a note, it does not matter what mailbox it was received on.
The project only matters when its a new issue
So you do not have to worry about the sender email address for MantisBT as long as at least one EmailReporting mailbox is monitoring it for new emails
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: Issue not created

Post by Mophilly »

Thank you. That helps.

Assume a single reporter, and the two projects as before, and two web forms for user submissions. The web forms are created with a tool such as Contact 7 for Wordpress, which has an email address field for the submitter, and an email address use to send the completed form data.

Form:
submitter: client email
sender: known email account at the server

How would I set up the form template to have one web form post to one project, and a second form post to the other?

UPDATE: I reviewed and revised the email accounts for posting to mantis. I am not clear so I have attached a file containing my set up. It also contains the debug output.
Last edited by Mophilly on 15 Dec 2018, 21:19, edited 2 times in total.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Issue not created

Post by SL-Gundam »

That depends on the functionality of Contact 7 for Wordpress

I would try to add another form field with which the user can decide for which project this new issue is meant.
Based on the value chosen, the form would have to send the email to the corresponding email address for that project

But honestly this is a really roundabout way of using EmailReporting. Ideally you would want the web form to talk to MantisBT directly without using emails. MantisBT has api's available for this. The problem would be the web form which would have to talk to the api's
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: Issue not created

Post by Mophilly »

Thank you, again. I appreciate your help. I attached a file to my previous post that contains my set up.

I am not familiar with the Mantis API, although I have a lot of expertise with API's in general. My hope for this was that the web master could implement without specialized coding.

Can there be two or more Mailboxes defined that post to different projects?

If I include a project name field in the form, does EmailReporting require a specific label text in order to parse it correctly and post to the intended project?
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: Issue not created

Post by Mophilly »

I needed to delete the setup file and remove a couple of details. Here it is, corrected for public use.
Attachments
EmailReporting-details.txt
(2.39 KiB) Downloaded 636 times
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Issue not created

Post by SL-Gundam »

Mophilly wrote: 15 Dec 2018, 21:18 ...
Can there be two or more Mailboxes defined that post to different projects?

If I include a project name field in the form, does EmailReporting require a specific label text in order to parse it correctly and post to the intended project?
Yes. Every mailbox in EmailReporting has a field for the project and category that you want to use for new issues imported through that mailbox.

No. Incase of POP3 this needs to be a completely separate email account for EmailReporting to process (see first answer). IMAP is the exception when using "Create project subfolder structure". But that would mean the INBOX folder is not processed and would require you to manually move files to different project folders so that EmailReporting will import them
http://www.mantisbt.org/wiki/doku.php/m ... ilbox_type

Based on the provided file, here are some comments
Use only default reporter: No
Sign up new users: No
Because you're using a webform instead of the default Report form in MantisBT, i suspect that you do not want users visiting MantisBT at all. In this case "Sign up new users: No" is good. But you should enable "Use only default reporter: Yes"
In this case also enable "Write the sender of the email into the issue report/note"

So in short with your current configuration EmailReporting is checking for emails in the IMAP mailbox folder \INBOX\prod_1\ (and whatever other project that are accessible)
It is not checking the INBOX folder itself
Since new emails arrive in the INBOX you would need to move those emails to the proper subfolder for them to be processed.
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: Issue not created

Post by Mophilly »

Thank you for the detailed information. We, well, Andy of our staff, worked out how to make this work as desired. :-)
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Issue not created

Post by SL-Gundam »

Good to hear you got it to work as desired.

If any code changes were required i would be interested to know them. On the other hand if you only needed to modify the configuration then that is even better
Post Reply