Write a list's content on an email - properties

I use a file properties where I define the body message of my email. For example, I have this property:
mail.model.message=My name is ${name}.
Where ${name} is a variable.
But what if I have a list of names? how can I write a loop?
Thanks.

For a loop it's:
[#list listName]${name}[/#list]

Related

how to get the number of attachment and its corresponding name in an email to file scenario on Mule?

I am developing an email to file scenario where in I need the number of attachment count and its name so I can pas it to another flow. I know this can be done by MEL on the Variable component but I just cant get the values. Also, I tried to use for each but I can get the counter variable values. Please advise.
To get the count:
#[message.inboundAttachments.size()]
To get the names:
#[message.inboundAttachments.keySet()]

How to get mail attachment name while reading mail using mule imap inbound?

currently i am working on one of mule use case where i need create a mule flow which reads mail from gmail account which has an attachment.
Currently i am able to retrieve the attachment data from mail, but i couldn't able to get the mail attachment name.
Can some one help me out to get the attachment name from mail.
Attachments are instances of javax.activation.DataHandler - http://docs.oracle.com/javaee/1.4/api/javax/activation/DataHandler.html
SO you should be able to call .getName() or .name on each attachment using MEL. i.e #[message.inboundAttachments.someattachment.name]
The object you're apply MEL to is an instance of InboundAttachmentMapContext, which is a Map.
So what about using keySet() to get the attachment names or entrySet() to get entries of (name, attachment)?
use #[key], this will give filename inside foreach statement.
Use #[counter] to get the file array no.

Smarty Templates - Variable Inside Variable?

So I am currently doing a custom WHMCS template that uses the smarty template system. One of the calls is as follows:
{$customfield.input|replace:'>':'placeholder="Placeholder' >'}
Now this works in that it sets the placeholder with the text Placeholder. What I am trying to achieve is to get the following variable inside where the Placeholder text is:
{$customfield.name}
So I need something like the following:
{$customfield.input|replace:'>':'placeholder="{$customfield.name}" >'}
but that doesn't work.
Is this possible?
Correct way to do it
{$customfield.input|replace:'>':"placeholder='`$customfield.name`' >"}
Drop the braces around the second variable:
{$customfield.input|replace:'>':'placeholder="{$customfield.name|escape:html}" >'}

jenkins - variables not visible

I am trying to display a custom message in the e-mail that is sent after the job is built. I would like to include the svn url and another variable BranchId from where the code was checked out into the email body.
I tried SVN_URL_1 as given in the quick help on fields in the jenkins job-configure page, but it is displayed as it is in the email i.e. I get the actual string $SVN_URL_1 and not the value.
I tried adding a environment variable as shown below
Output is same, I get the string as is $BranchId.
Any ideas how to define such variables and use them later in email message?
I was trying to display the variable as $name, but the correct syntax of displaying any env variable/ parameter passed to the job/ env variable set as above is
${ENV,var="name"}
e.g.
${ENV,var="PATH"}
${ENV,var="BranchId"}

bazaar auto tag

I want to use the automatic_tag_name hook to automatic create tag name without the need of manually typing
I tried to write it like it : automatic_tag_name(branch name,10)= "GIL"
Is it the correct syntax? (i found iittle information on it in the documents)
Is it possible to create tag name from a file? this file will contains only the tag name
See this example pahe here:
http://doc.bazaar.canonical.com/latest/en/user-guide/hooks.html
SO correct call should be:
def post_push_autotag(push_result):
automatic_tag_name(push_result.new_revno)
branch.Branch.hooks.install_named_hook('post_push_autotag', post_push_autotag, 'My autotag')