Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sending HTML mail with 'SO_DOCUMENT_SEND_API1'

Former Member
0 Likes
901

Hi to all,

after I have implemented a proram that sends html mail with 'SO_DOCUMENT_SEND_API1' I've realised that in other version of Outlook it doesn't render in the right way. Font is diverse and hyperlink doesn't work anymore !!

I don't know what to do because in my Outlook version everything is ok and I don't understand if it's a problem in the structure of html (tag not close or something similar) and in my version is ok because is more permissive... but the html code create in abap seems to be ok...

Is there a way to "generate" an html code (using a template for example) intothe ABAP program that is surely working and standardize in every context ?

Thanks to all in advance

Andrew

3 REPLIES 3
Read only

brad_bohn
Active Contributor
0 Likes
675

I would find it hard to believe that it's not related to an Outlook setting for the current account. I've used HTML emails for quite some time across multiple versions of Outlook and never had an issue that wasn't related to a security setting or an option setting. How does the HTML render in various browsers or web-based email clients (save the email content as html and open it with various browsers)? How old is the Outlook version and how are you controlling the fonts? Are you using styles or stylesheets?

Read only

Former Member
0 Likes
675

Hi Brad,

thank you for your answer.

Well, part of the problem related to the hyperlink could be solved. The hyperlink was very long (more than 1000 char ) and it seems to be an important difference in the way Outlook handles this long hyperlink between the 2003 and 2007 version (2003 version seems to be more permissive while in the erlier version the link gets truncated ).So we have decided (through workaround) to shorten the link.

Now I have facing font problem. I'm not so keen on html code ...I'm using both css stylsheet in this way (which point ,after <Body> ? :

concatenate '<STYLE TYPE="text/css">'

'<!--'

'TD{font-family: Tahoma; font-size: 10pt;}'

'--->'

'</STYLE>' into mail_text_html.

APPEND mail_text_html.

clear mail_text_html.

but also (with '</SPAN>') :

move '<span style="font-size:10pt;font-family:Tahoma">' to mail_text_html-line .

append mail_text_html.

clear mail_text_html.

Please, if you have suggestions let me know. I would appreciate...

Thank you .

Andrew

Read only

brad_bohn
Active Contributor
0 Likes
675

That is a seriously long hyperlink! I often break up my anchor and image tags into multiple text elements and append them to the html body without issue and I've used both 2003 and 2007. I doubt I've actually gone over 1000 char though. Did you check MSDN for any articles about that restriction? Your style declarations should go in your html header and then you would reference them in your body. Again, I use text elements (and macros) to build my html code so a code snippet won't really help but your basic declaration looks OK for your table cell style.