You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am trying to implement a script and run it with Scriptrunner that sends an email using the gmail SMTP.
I tried several script examples I found online, most of them from the Atlassian Community, but none worked (I received compilation errors about missing classes).
I know that with a script one cannot send an email using the SMTP of Atlassian, as this is not a SMTP. This is why i was thinking in using the gmail SMTP.
If you want to bypass the jira email system altogether, you'll need to import some smtp or mail handler class.
At this point, you're dealing with standalone groovy/java and you'll have better luck with generic forums rather than jira/atlassian specific ones.
Quick google got this as first hit: https://gist.github.com/quchie/3e02c5d5df8de804e8e0
I don't have access to a cloud instance, but does scriptrunner with cloud support grapes?
It looks like the javax.mail is available in a public maven library
You can try this
@Grab(group='javax.mail', module='mail', version='1.4'
It may not work the very first time since it takes a bit of time to download the library in the cache.