Mail Text

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

Moderators: Developer, Contributor

NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Mail Text

Post by NandoNaldo »

Hello, i configured the EmailReporting but i have some problems during the configurations:

1- I don't want the signature of the mail to be attached in the issue
I tried Block attachments matching these MD5 hashes [what should i write here ?]
Strip signature from email body

2- There is to much space beetwen lines in the mail converted in a issue

3- I tried to replie to a mail ( the first mail was created as an issue), and it created me another issue ( i wanted to add the notes in the existing issue)

thnx
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

Its meant to block attachments
You need to provide the MD5 hash of said attachments

Easiest would be if you already have an attachment you don't want in MantisBT.
1. Download it
2. Calculate the MD5 hash which can be done with a variety of tools available on the internet
3. At the resulting MD5 hash to the list in EmailReporting

Attachments that are not always the same are problematic with this solution

For erasing complete signatures i suggest have a look at "Strip signature configuration options (Experimental)" in EmailReporting

As for adding notes
- Make sure you've set "Add notes" to "Yes" (http://www.mantisbt.org/wiki/doku.php/m ... d_bugnotes)
- Set "What kind of search should be used to find the issue id in the subject" to your use case (http://www.mantisbt.org/wiki/doku.php/m ... t_id_regex)
- Set "Use Message-ID in Mail header to identify notes" to "Yes" (http://www.mantisbt.org/wiki/doku.php/m ... message_id)

That should cover the 2 methods in which Emails should become notes, not new issues
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: Mail Text

Post by NandoNaldo »

Nothing happend about the mail reply :(
Attachments
config2.JPG
config2.JPG (71.35 KiB) Viewed 16369 times
config 1.JPG
config 1.JPG (128.38 KiB) Viewed 16369 times
Last edited by NandoNaldo on 13 May 2016, 12:26, edited 1 time in total.
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

The MD5 blocklist blocks attachments, not text in an email. If your signature is an image it would work... otherwise it won't

As for signature stripping. Make sure you fill in the proper starting placeholder for the signature "Delimited by". It's what EmailReporting will be looking for and will use for the starting point of the stripping. By default this is "--" which propably does not apply for your signature

For "Use this text to identify the starting point of a reply" you need to fill in something that will be the only thing on a single line. "RE:" is propbably part of the subject line but is not a line in the text in and of itself

Are emails converted to notes when aplicable now? or does that not work as you want it yet?
Last edited by SL-Gundam on 19 Sep 2017, 15:42, edited 1 time in total.
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: Mail Text

Post by NandoNaldo »

I made another test, but after replying a mail ( the first mail was created as an issue), this time again mantis created another issue. all i want is to add this replie to the issue.

Olso i noted that, there is to much spaces bettwen lines ( after the mail is converted to an issue)
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

I think i found your problem with replies

The emails are retrieved from newest to oldest. This means that the reply might be imported before the earlier email to which was replied.
I'm going to look into reversing this
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

Alright this should be fixed now

Code: https://github.com/mantisbt-plugins/Ema ... 6562a8f779

You can get the fix by downloading 0.9.1-DEV (https://github.com/mantisbt-plugins/EmailReporting) or you can wait a couple days when 0.9.1 stable is released (only a version number change though so should not matter)
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

As for the issue with too many spaces

As stated here https://www.mantisbt.org/wiki/doku.php/ ... parse_html the conversion from html to plaintext is done by Simple HTML DOM. It's not perfect i'm afraid but it gets the job done and is really only a last resort solution

Its much better if your mail server provides a plaintext version of the email which is normally done. There are exceptions like with Exchange but that can be fixed most of the time. Examples for Exchange can also be found here https://www.mantisbt.org/wiki/doku.php/ ... parse_html. For other mail server i'm not sure but there should be documentation how to get this done
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: Mail Text

Post by NandoNaldo »

OK, i installed dhe new version. What about the configurations ? Bacause, i tried and still nothing happend.
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

Which issue are you currently still having because we've discussed multiple ones
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: Mail Text

Post by NandoNaldo »

i installed the new version of emailreporting plugi, but it still the same thing: when i make a replie to a mail ( the first mail was created as an issue), and it created me another issue ( i wanted to add the notes in the existing issue)
Attachments
Plugin 2.JPG
Plugin 2.JPG (142.34 KiB) Viewed 16286 times
Plugin 1.JPG
Plugin 1.JPG (232.96 KiB) Viewed 16286 times
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

Weird that it does not work. It should work based on the settings you showed in the screenshots

If you get a MantisBT notification email and respond to that email (keeping the subject line intact) it should be matched based on the issue id number in the subject line to the correct issue
In case it concerns a mail conversation between 2 people where MantisBT is in the CC, it should recognize the email id and match the emails together so that new emails are inserted as notes
Emails with the exact same subject will not be added in the same issue

Could you explain how you are testing this feature? Maybe that will give me an idea on what is going wrong
What mail server software are you using?
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: Mail Text

Post by NandoNaldo »

:) :) :) :)

I apologize about all this :). I didn't understand what you where saying: YEP, it worked: when i get a MantisBT notification email and respond to that email, the new emails are inserted as notes.

But i have another problem:

1- I send an email
2- Manits converted in a new issue
3-Later, i forgot smth ( for ex), and i replay to the first mail, not to the MantisBT notification email but to the original mail ( sent with Outlook/Exchange), the second mail ( actually is a reply) is created as a new issue.

In this case: the mail sender who send mail notification is the same mail who i made a reply ???
Thnx


During the day, i made another test and i think that i found a solution :P

So, when i make a replay to the MantisBT notification email, this mail is added like a note. Like i was saying, i make a replay to the first mail, and this time, like a subject, i changed it.
at the beginning the subject was: RE: TESTING, but this time i changed to: RE: [HelpDesk TEST 0000153]: TESTING. ( HelpDesk TEST is the name of our project)
SL-Gundam
Posts: 608
Joined: 06 Jul 2011, 14:17

Re: Mail Text

Post by SL-Gundam »

It's weird that the email id system does not recognize reply's properly with you. If i want to fix this i or you would have to debug it on your system to find the cause since i cannot seem te reproduce it on my system

At least the issue id in the subject works properly.
ash.raghav
Posts: 10
Joined: 03 Sep 2017, 23:26

Blocking Attachments

Post by ash.raghav »

SL-Gundam wrote:The MD% blocklist is blocks attachments, not text in an email. If your signature is an image it would work... otherwise it won't
Hi,

This is a quote from one of your previous responses to another thread. I think it would be better if the plugin can block attachments by extension and not MD5 hashes because if the image is different then its not going to work (you mentioned this also previously).

I am sure you have some strong reason to use MD5 hashes and not extensions which I don't want to discount but in an ideal world with tons of images or attachments coming through emails, I would be happy to restrict by extensions as I cannot afford to generate MD5 hashes redundantly.

The main MantisBT configuration does have the provision to disallow files by extensions in the config_defaults_inc.php, so it would be great if Email reporting could adapt the same.
Post Reply