Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delphi and outlook

Status
Not open for further replies.

earlrainer

Programmer
Mar 1, 2002
170
IN
Hi,
I have some delphi code that can send mail to MS outlook. It works fine except for one problem.
The mails I have to send are in html format. There is a small image i have to print on all mails.

so when i make mail from delhi I just write
Mailitem.body:= {my code}.....<img src=&quot;c:\images\a.jpg&quot;>....etc {my code}

When this mail is sent to Outlook, I can go to outlook and I CAN see the image on every mail.

But at the receipient , he receives a mail with no image (it seems it can find c:\images\a.jpg)
how do i solve this problem.

If I go to outlook and compose a mail there and say insert picture ,and then if i send this email, then the receiver gets the image.

how can i achieve same in delphi
 
I assume that you meant to say

(it seems it can't find c:\images\a.jpg)

You did not say if you attached the file a.jpg to the mail or not.

Also I suspect that you don't need the path in the

Code:
<img src=&quot;c:\images\a.jpg&quot;>

as how can you know what directory structure your recipient has on his computer?

Andrew

 
Yeah, the picture may be on your computer, but if it's not on there's it doesn't help at all.
 
Its getting more and more interesting :)

I modified the code to just
<img src=&quot;a.jpg&quot;>

and I sent the file a.jpg as an attachment,

then i tried to see the received mail.

IT WORKS in outlook express, MS outlook i.e i can see the embedded image

BUT DOES NOT WORK in yahoo ..all i see here is a red cross
:-(

 
I had to do this in a VB.net project. I included an image off the internet like this:
Code:
<img src="[URL unfurl="true"]http://www.internet.co.uk/images/example.jpg">[/URL]
Because anyone who receives emails by definition should have an internet connection. So when they open up the email it should drag down the image from the web site.

I've not experimented with it too much, but the customer who I did this for has never complained.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top