cancel
Showing results for 
Search instead for 
Did you mean: 

Picture in the body mail using Mail Package.

pedro_baroni3
Active Contributor
0 Kudos

Hello Experts,

I have an interface RFC-to-Mail using Mail Package, which define a body text for the mail.

I would like to insert an image (JPG) in the body of the email (not as an attachment). Does anyone know if you can tell me to read the binary file via Java Mapping (or UDF) and insert it in Content of the Mail Package?

Tks in advance.

Pedro Baroni

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You are trying to insert image in the body. That means your body content must have html format.  That means you have to write html syntax and insert image in it. This is possible. Again if your mail editor is not html enabled then you might not able to view it.  Browsers based mail will display image content in the body. refer this link for insert image.  Read the image file from database using java mapping and return your reply as html in string  and inside html insert image tag.

http://www.w3schools.com/tags/tag_img.asp

pedro_baroni3
Active Contributor
0 Kudos

Hi Baskar,

No, o not use HTML. When I say "body", it's a body of mail, not body of html, because I use Mail package like this:

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">

<Subject>Hello</Subject>

<From>sender@sender.com</From>

<To>receiver@receiver.com</To>

<Content>This is a mail</Content>

</ns:Mail>

I need insert image in tag <Content>.

Regards.

pedro_baroni3
Active Contributor
0 Kudos

But.......html is another way.

I try this with Embedding Base64 Images, like:

Embedding Image in mail body instead of sending it as an attachment

Thanks!


Answers (2)

Answers (2)

0 Kudos

Hi Pedro,

you can refer to following link

http://scn.sap.com/docs/DOC-42618

pedro_baroni3
Active Contributor
0 Kudos

Experts,

Any idea?

Tks