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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

182 views 1 17
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