Error "Mail is disabled" while trying to use my Custom Mail Handler plugin

Hi colleagues. ;)

I'm trying to write Custom Mail Handler for creating/modifying issues according to contents of notifications sent by mail. I want to process contents of mail contents with my own code.

 

I went through atlassian tutorial. Tried to simplify things and added only one component (java class). This Java class implements MessageHandler interface.

I'm testing this plugin on localhost:2990/jira (2990 port).

 

But mail handler doesn't work and return this error in command line:

 [INFO] [talledLocalContainer] 2017-12-05 13:18:39,213 Caesium-1-1 INFO anonymous    CompanyName Support Robot [c.a.mail.incoming.mailfetcherservice] CompanyName Support Robot[10001]: Mail is disabled.

 Mail handler doesn't work and doesn't delete message from mail box.

 

I also tried code from (used all files for plugin): 

git clone https://bitbucket.org/atlassian_tutorial/jira-add-email-handler.git

->Same problem.

my java class (modifyed for security reason):

package com.company.plugin.companynamemailhandler;

import com.atlassian.jira.bc.issue.IssueService;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.IssueInputParameters;
import com.atlassian.jira.service.util.handler.MessageHandler;
import com.atlassian.jira.service.util.handler.MessageHandlerContext;
import com.atlassian.jira.service.util.handler.MessageHandlerErrorCollector;
import com.atlassian.jira.user.ApplicationUser;

import java.util.Map;
import javax.mail.Message;
import javax.mail.MessagingException;

import com.atlassian.jira.user.UserUtils;
import com.atlassian.mail.MailUtils;


public class CompanyNameHandler implements MessageHandler {

//author of issues
private String userName = "admin";

@Override
public void init(Map<String, String> params, MessageHandlerErrorCollector monitor) {
//There is no any code inside this method
}


@Override
public boolean handleMessage(Message message, MessageHandlerContext context) throws MessagingException {

//In this part of program im creating issue and comment based on incoming mail.
//Deleted for security reason.

return true;
}
}

 

Please help me to solve this :) I'm already ill from debugging and don't really know how to bread through this issue.

I'm using jira 7.5.2 and my mail box is on gmail, sending also from gmail.

 

Thank's in advance.

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,323 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot