Hi,
I'm using Mantis 1.2.10 and EmailReporting 0.9.0. I read ReadMe document and this forum several times, but I'm not able to make the plugin work. I made a gmail account to send mails and create issues, configured the mailbox correctly, added a new default user assigned to this email, but when i send a message, nthing happens. I can test the mailbox and nothing happens either...
Don't know what to do... please help.
Thanks.
First steps
Moderators: Developer, Contributor
Re: First steps
You need to schedule a job that runs /mantisbt-root-folder/plugins/EmailReporting/scripts/bug_report_mail.php
This is explained in the readme
The test only tests whether the connection to the mailbox works. It will not actually retrieve any emails
This is explained in the readme
The test only tests whether the connection to the mailbox works. It will not actually retrieve any emails
-
- Posts: 68
- Joined: 06 Aug 2012, 18:13
Re: First steps
First of all make sure you have the CORRECT gmail settings. You can also turn on DEBUG MODE in the email plugin configuration settings to see more information if the script is failing to add an entry to your mantis database.
Here are the gmail settings that worked for me
Description: Gmail test
Mailbox Type: pop
Hostname: pop.gmail.com
Tcp port (optional): left blank
Connection encryption: ssl
Username: xxxx@gmail.com --> make sure you have the @gmail.com entry or else it does not work
Password: the password for the gmail account you setup
Authentication user: USER
Once you have all that setup, send an email to your account and run the script /plugins/EmailReporting/scripts/bug_report_mail.php from your web browser. Make sure you setup the script to run from the web browser (set to no by default) just to test..once everything is working correctly you should set this back to NO and use the following script instead.
create the file mantisemailcheck.sh and add this into it, make the script executable and then run it.
# !/bin/bash
/opt/ktdms/php/bin/php /path/to/plugins/EmailReporting/scripts/bug_report_mail.php
the /optktdms/php/bin/php is the path to the actual 'php' executable. You should see output like this if you run the script from your terminal
Mailbox: INITIALIZATION PHASE
Message: Debug output memory usage
Location: Mail API - Finished __construct
Current memory usage: 9.36 MiB / -1
Peak memory usage: 9.36 MiB / -1
Current real memory usage: 9.5 MiB / -1
Peak real memory usage: 9.5 MiB / -1
array(12) {
["enabled"]=>
bool(true)
["description"]=>
string(16) "Gmail Email Test"
["mailbox_type"]=>
string(4) "POP3"
["hostname"]=>
string(19) "ssl://pop.gmail.com"
["port"]=>
int(995)
["encryption"]=>
string(3) "SSL"
["username"]=>
string(22) "xxx@gmail.com"
["password"]=>
string(16) "MXFhejJ3c3dsfadfaUUSJgjRURD"
["auth_method"]=>
string(4) "USER"
["project_id"]=>
int(7)
["global_category_id"]=>
int(1)
["link_rules"]=>
array(1) {
[0]=>
int(1)
}
}
Mailbox: Gmail Email Test
Message: Debug output memory usage
Location: Mail API - Start process mailbox
Current memory usage: 9.37 MiB / -1
Peak memory usage: 9.37 MiB / -1
Current real memory usage: 9.5 MiB / -1
Peak real memory usage: 9.5 MiB / -1
Mailbox: Gmail Email Test
Message: Debug output memory usage
Location: Mail API - Finished process mailbox
Current memory usage: 9.37 MiB / -1
Peak memory usage: 9.38 MiB / -1
Current real memory usage: 9.5 MiB / -1
Peak real memory usage: 9.5 MiB / -1
Once you have that working, you setup a cronjob to make the script run every X minutes. I have mine setup to run every 5 minutes.
crontab -u root -e
5,10,15,20,25,30,35,40,45,50,55,59 * * * * /root/backup_scripts/mantisemailcheck.sh
Once mail has arrived to your Gmail account you will see this in your script output
Mailbox: Gmail Email Test
Message: Reporter: 79 - xxxx@xxx.com --> Issue ID: #756
Mailbox: Gmail Email Test
Message: Debug output memory usage
Location: Mail API - Finished add bug
Current memory usage: 9.86 MiB / -1
Peak memory usage: 9.9 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
that shows a new entry with ID# 756. It should be at the top of your 'view issues' page in mantis.
good luck
Here are the gmail settings that worked for me
Description: Gmail test
Mailbox Type: pop
Hostname: pop.gmail.com
Tcp port (optional): left blank
Connection encryption: ssl
Username: xxxx@gmail.com --> make sure you have the @gmail.com entry or else it does not work
Password: the password for the gmail account you setup
Authentication user: USER
Once you have all that setup, send an email to your account and run the script /plugins/EmailReporting/scripts/bug_report_mail.php from your web browser. Make sure you setup the script to run from the web browser (set to no by default) just to test..once everything is working correctly you should set this back to NO and use the following script instead.
create the file mantisemailcheck.sh and add this into it, make the script executable and then run it.
# !/bin/bash
/opt/ktdms/php/bin/php /path/to/plugins/EmailReporting/scripts/bug_report_mail.php
the /optktdms/php/bin/php is the path to the actual 'php' executable. You should see output like this if you run the script from your terminal
Mailbox: INITIALIZATION PHASE
Message: Debug output memory usage
Location: Mail API - Finished __construct
Current memory usage: 9.36 MiB / -1
Peak memory usage: 9.36 MiB / -1
Current real memory usage: 9.5 MiB / -1
Peak real memory usage: 9.5 MiB / -1
array(12) {
["enabled"]=>
bool(true)
["description"]=>
string(16) "Gmail Email Test"
["mailbox_type"]=>
string(4) "POP3"
["hostname"]=>
string(19) "ssl://pop.gmail.com"
["port"]=>
int(995)
["encryption"]=>
string(3) "SSL"
["username"]=>
string(22) "xxx@gmail.com"
["password"]=>
string(16) "MXFhejJ3c3dsfadfaUUSJgjRURD"
["auth_method"]=>
string(4) "USER"
["project_id"]=>
int(7)
["global_category_id"]=>
int(1)
["link_rules"]=>
array(1) {
[0]=>
int(1)
}
}
Mailbox: Gmail Email Test
Message: Debug output memory usage
Location: Mail API - Start process mailbox
Current memory usage: 9.37 MiB / -1
Peak memory usage: 9.37 MiB / -1
Current real memory usage: 9.5 MiB / -1
Peak real memory usage: 9.5 MiB / -1
Mailbox: Gmail Email Test
Message: Debug output memory usage
Location: Mail API - Finished process mailbox
Current memory usage: 9.37 MiB / -1
Peak memory usage: 9.38 MiB / -1
Current real memory usage: 9.5 MiB / -1
Peak real memory usage: 9.5 MiB / -1
Once you have that working, you setup a cronjob to make the script run every X minutes. I have mine setup to run every 5 minutes.
crontab -u root -e
5,10,15,20,25,30,35,40,45,50,55,59 * * * * /root/backup_scripts/mantisemailcheck.sh
Once mail has arrived to your Gmail account you will see this in your script output
Mailbox: Gmail Email Test
Message: Reporter: 79 - xxxx@xxx.com --> Issue ID: #756
Mailbox: Gmail Email Test
Message: Debug output memory usage
Location: Mail API - Finished add bug
Current memory usage: 9.86 MiB / -1
Peak memory usage: 9.9 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
that shows a new entry with ID# 756. It should be at the top of your 'view issues' page in mantis.
good luck