No outgoing email sent for custom field 'user picker' and also its not mentioned in the log file of JIRA too

I have created a custom field which is a user picker. But for a transition where in we have to send emails to 2 users one being the reporter and another the user picker custom field , the email is sent only to the reporter. When i checked the atlassian outgoing log file only the reporter's email details has been listed whereas nothing is mentioned about the mail sent to custom field. However in the Mail Queue in Jira i am able to see both these mails sent but in the log file its only mentioned about the mail sent to the reporter. I dont know why the mail is not being sent to the custom user picker field and no logs are generated.

2 answers

1 accepted

Jayshree,

as said by the Tibor Heygi, you need to write a email code in your postfunction. The following is a sample

MailServerManager mailsrvmngr = comAcc.getMailServerManager();
SMTPMailServer mailserver = mailsrvmngr.getDefaultSMTPMailServer();
if(mailserver != null)
{
UserUtil userManager = comAcc.getUserUtil();
String gsctaemailaddr = userManager.getUser("gscta<user>").getEmailAddress();
Email email =new Email(gsctaemailaddr);
email.setFrom("<your address>");
mailserver.send(email);
}

Do you have a post function sending the email? If so, move the post function down in the post function list. Perhaps set it to be the last one. This would make the field values saved before the email is sent.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

74 views 0 11
Read article

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