i configured SMTP in jira but when i am trying to send email smtp always null.also email object "from" return null
Example code:
Email em = new Email("bscitramesh@gmail.com");
System.out.println("em;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"+em);
em.setSubject("Example Subject");
em.setBody("Hello");
em.setEncoding("text/plain");
SingleMailQueueItem smqi = new SingleMailQueueItem(em);
System.out.println("smqi;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"+smqi);
ComponentAccessor.getMailQueue().addItem(smqi);
Here is a working example for custom email with Jira JAVA API
import com.atlassian.mail.Email;
import com.atlassian.mail.queue.SingleMailQueueItem;
Email email = new Email("email_address@company.com");
email.setCc("another_email_address@company.com");
email.setFromName("what ever you want");
email.setSubject("what ever you want");
email.setBody("what ever you want");
email.setMimeType("text/html");
SingleMailQueueItem smqi = new SingleMailQueueItem(email);
ComponentAccessor.getMailQueue().addItem(smqi);
Note that "setCc" and "setFromName" are not mandatory, you can remove these rows if you don't want them.
You can check your mail queue in Jira to make sure your code works and email are going to the queue.
If the email not sending then you configured the mail server wrong.
Try the code, check if you see the mail in the queue, and/or it being sent.
Let me know the outcome.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi guys, does someone has an example of How I can send an outlook event "Appointment" from JIRA?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not an example, but a hint.
setMultipart(javax.mail.Multipart appointment)
There are multiple examples of the format scattered around the internet...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.