on 12-19-2014 5:43 PM
Hello,
I'm trying to send email from BODS using SMTP_TO / MAIL_TO functions. The message that I'm trying to send is as below:
<html>
<head>
</head>
<body>
<table style="background-color:black;">
<tr>
<td>
<label style="background-color:white;">Test HTML email</label>
</td>
</tr>
</table>
</body>
</html>
When I receive the email, I'm receiving just the above text AS IS. I would like to receive it in a HTML format which should say just say "Test HTML email" with a black background. Is there anyway to accomplish this in Data Services?
Hi,
Call VB script or python script from command line, you can do anything command line script
Regards,
Manoj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep Veldi,
I was faced with the same problem. After some search on the web and some tests from my side, it seems that it is not possible to send an HTML email via SMTP_TO or MAIL_TO of the SAP data services functions.
I suggest to you an another solution that I have used to solve this problem :
1) Install the tool sendemail
2) Add a script inside a job dataservices and use it :
$my_sender = 'D:\\script.vbs "michel.m@zzzz.com, receiver2@zzzz.com"';
$my_subject = ' "your text subject" ';
$my_message = '"<html><body><table border=4 cellspacing=4 cellpadding=4><tr><b><td ALIGN=MIDDLE>COD_LOC</td><td ALIGN=MIDDLE>COD_MOD</td><b></tr><tr><td ALIGN=MIDDLE>2015100225</td><td ALIGN=MIDDLE>L4110</td></tr></table></body></html>"';
print(exec('cscript',$my_sender || $my_subject || $my_message, 8));
Be carreful to make a space between $my_sender and $my_subject and $my_message because vbscript has to identify clearly each variable arguments that you will use in the script vbs below.
Refer to the space that I have used in $my_subject at the begining and at the end to make a separation between each variable.
3) Make a vbscript with the name script.vbs according to the name that you have choosen in $my_sender and put it :
Dim my_chaine
Set oShell = WScript.CreateObject("WSCript.shell")
Set oArgs=WScript.Arguments
my_chaine = "c:\scripts\sendemail -f edi@yyyy.fr -t " + oArgs(0) + " -u " + oArgs(1) + " -m " + oArgs(2) + " -s smtp.zzzz.com:2225"
oShell.run my_chaine
I hope that it will help you.
Best regards,
Michel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.