2013-08-06 06:40 AM
I tried to use the "Additional Text" tab in the send email command so I could send more information of what was done in the workflow, like: datastore name created, LUN ID and so on...
All of that data is built from "text between apostrophes" AND objects from previous commands in the workflow.
Since the output in additional text tab is long, I'm trying to insert a "\n" between the info parts, so the mail will be more readable.
The problem I'm facing is that when I run a "preview", it shows the data that is about to be sent just fine.
When executing the command, it says that the command is missing a From and Subject parameters. One can see that it actually does a new line break in the ps1 command, which causes the from and subject parameters after "additional text" not to be considered.
Do you have an idea about that or another way to send more info in an email command, using line breaks for readable email output?
Many thanks guy!
Solved! SEE THE SOLUTION
2013-08-06 10:44 AM
Use the new line separators "`n" between texts
Additional Text = "WFA"+"`n"+"NetApp"
will send a mail with WFA and NetApp in different lienes
2014-02-07 10:47 AM
The above example worked perfectly ... "WFA"+"`n"+"NetApp" ... but why do I find almost no other example uses function as expected. For example, why does this:
"WORKFLOW PARAMETERS"+"`n"+"CLUSTER VSERVER SHARE"
return this in the email
Workflow executed by User = admin
Additional Text = WORKFLOW PARAMETERS`nCLUSTER VSERVER SHARE
what is different?
2014-02-07 05:58 PM
Two steps needs to be done...
First: change the "send email" command to use HTML as body (that will be new non-certified command, since you can't edit the original one).
You do it by: Search for this line and change it to "True" as follows:
$mailMessage.IsBodyHtml = $True
insert this command to your workflow instead of the certified one.
Second: use this example for inserting a line break to the "additional text" tab:
"NAS volume created: "+volume.name+"."+"<BR />"+"In filer: "+$ArrayChosen+"."+"<BR />"
The "<BR />" in HTML format will do a line break every time (no once works and once doesn't)
Please try it and tell me what you think.
I changed it at my customers' and it works perfect.