# Win32ole and outlook

**URL:** <https://www.ruby-forum.com/t/win32ole-and-outlook/171484>\
**Category:** Ruby\
**Created:** [July 3, 2009, 11:22am UTC](https://www.ruby-forum.com/t/win32ole-and-outlook/171484 "2009-07-03T11:22:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neverhood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a9a28c/32.png) [@neverhood](https://www.ruby-forum.com/u/neverhood)\
**Post date:** [July 3, 2009, 11:22am UTC](https://www.ruby-forum.com/t/win32ole-and-outlook/171484/1 "2009-07-03T11:22:53Z")

</div>

Hi everbody!  
I`m trying to send mail which has some embedded images. Everything`s  
working great except incoming mail has a blank spaces which are supposed  
to be images.

here`s the part of html body I use :

\<img src="C:\My Documents\NetBeansProjects\mail\lib\yahoo.gif" ...

message.Attachments.Add(‘C:\My  
Documents\NetBeansProjects\mail\lib\yahoo.gif’, 1)

so there`s an attachment but no embedded image

Maybe someone has dealt with something like that, i would be happy to  
hear any ideas and suggestions. Thanks!

---

<div class="post-metadata">

**Author:** ![neverhood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a9a28c/32.png) [@neverhood](https://www.ruby-forum.com/u/neverhood)\
**Post date:** [July 4, 2009, 11:40am UTC](https://www.ruby-forum.com/t/win32ole-and-outlook/171484/2 "2009-07-04T11:40:42Z")

</div>

> here`s the part of html body I use :
> 
> \<img src="C:\My Documents\NetBeansProjects\mail\lib\yahoo.gif" ...

If this is the incoming message then your image has not been HTML  
embedded but instead your code has inserted a link to a local file  
that the receiver of course does not have. You need to use a public  
URL for that. For embedding (via mime-type) the immage inside the post  
Google “HTML image embedding” or look at fx

> **[Sending HTML Mail with Embedded Image in .NET: ASP Alliance](http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET.all)**
>
> In this article Soyuj Kumar explains the classes which are useful in .NET for sending an HTML e-mail with an embedded image, attachments and much more.

~/søren/
