Hi,
Iam facing 1 issue..i.e
I want to send email using TI process...but new line is not coming..in Body part of email..I tried Char(10),Char(13),\n,\r\n,%20...but no progress....Can anyone of you help me in getting a body to be separate...or any idea which best suits...all the article which i got...looks complex...
I want the format as shown below
Hi,
ABCCccccccccccccc
Deffffffffff
Thanks
But Iam getting the format as Hi,ABCccccccccccDefffffffffff
Thanks
How to add html code or any idea in TI process while sending email
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: How to add html code or any idea in TI process while sending email
What are you using to send emails?
VBS, an executable, powershell etc.
VBS, an executable, powershell etc.
Declan Rodger
-
- Posts: 128
- Joined: Thu Dec 15, 2011 8:22 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2003
Re: How to add html code or any idea in TI process while sending email
Currently I am using TI code no vbs....no other scripting i have used except TM1 code of sending email which i got from google.
similar to like as shown below...need to format body of an email like as shown below....means i need "enter" after 2 line.....
sFrom = 'tm1@yourcompany';
sTo = 'robin.mackenzie@somewhere.com';
sSubject = 'test';
sBody = 'test';
sSmtpServer = 'name of your smtp server';
# build powershell command
sPsCmd = '"& {
Send-MailMessage
-From ' | sFrom | '
-To ' | sTo | '
-Subject ' | '\"' | sSubject | '\"
-Body ' | '\"' | sBody | '\"
-SmtpServer ' | sSmtpServer | '
}"';
# execute command
ExecuteCommand ( 'powershell.exe -command ' | sPsCmd, 1 );
similar to like as shown below...need to format body of an email like as shown below....means i need "enter" after 2 line.....
sFrom = 'tm1@yourcompany';
sTo = 'robin.mackenzie@somewhere.com';
sSubject = 'test';
sBody = 'test';
sSmtpServer = 'name of your smtp server';
# build powershell command
sPsCmd = '"& {
Send-MailMessage
-From ' | sFrom | '
-To ' | sTo | '
-Subject ' | '\"' | sSubject | '\"
-Body ' | '\"' | sBody | '\"
-SmtpServer ' | sSmtpServer | '
}"';
# execute command
ExecuteCommand ( 'powershell.exe -command ' | sPsCmd, 1 );
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: How to add html code or any idea in TI process while sending email
Your code is using powershell.
Add the -BodyAsHTML parameter and then you can format the body using full HTML functionality.
Add the -BodyAsHTML parameter and then you can format the body using full HTML functionality.
Declan Rodger