SOS email template for user creation!

Hi,

I need an urgent help! I have to change the user creation email template. I found the usercreated.vm file but when I opened, I found this content:

$i18n.getText("template.user.created.createdaccount")

   $baseurl

$i18n.getText("template.user.created.text.line1")
$i18n.getText("template.user.created.text.line2")

$i18n.getText("template.user.created.passwordchanged")

  ${baseurl}/secure/ResetPassword!default.jspa?os_username=$velocityhelper.urlencode($user.name)&token=$params.get("password.token")

$i18n.getText("template.user.created.lastshowlong", $params.get("password.hours"))

  ${baseurl}/secure/ForgotLoginDetails.jspa?username=$velocityhelper.urlencode($user.name)


#parse("templates/email/text/includes/userdetails.vm")

$i18n.getText("template.user.initiatedby", $initiatingUser.fullName, $initiatingUser.email)

#parse("templates/email/text/includes/footer.vm")

Where can I add the constant text into this??? For instance: "Please enter after the first login..."

Can you please help?

Thanks in advance!

Rumi

1 answer

1 accepted

0 vote

That's a velocity file. You can actually just whack your static text straight into it, once you know where it's needed.

Think of velocity as a set of instructions for creating a block of text. As the server reads it, it does three things:

  1. If it finds something with $ in front of it, it looks to see if it's a variable or object that's been created in the page, or handed to it by the java behind it.
  2. If it finds something with # in front of it, it takes it as some form of processing instruction ("code" if you like"
  3. Anything else goes into the output text exactly as it's found

That's a completely non-technical and structurally inaccurate way to describe it. But it does actually describe what comes out.

Try belting in something like "Mr Flibble says 'Time to die'" on the second line - you'll see that come out, word-for-word on the second line of every email.

Hi Nic,

thanks!

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
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

91 views 0 1
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