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 Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

24,409 views 2 7
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