email with images embedded

T

Trapulo

Hello,
I need to send an email from vb.net. The body may be html encoded, and all
images related to the html (<img src....>) may be embedded in the email
content instead of refer to remote urls.

I've tried a lot of solution, but I can only get a message with images
embedded but no html, or message with html but no images embedded. What is
the right way to have this goal?

I have a dictionary with <image name, image content as byte array >, and a
string with <img src="image name">. I've tried working with AlternateView,
CreateAlternateViewFromString, LinkedResource objects...

thanks
 
W

Walter Wang [MSFT]

Hi Trapulo,

Please take a look at following faq and let me know if this works for you:

#How do I embed images in an email?
http://www.systemnetmail.com/faq/4.4.aspx
Embedding images is something that is new with System.Net.Mail....

Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Trapulo

Hello Walter,
I've embedded images using the way you suggested. However I have a problem:
mail clients as thunderbird, or webmails, shows images. Outlook Express only
shows html-formatted newsletter, but shows a red cross instead of images.

I've checked email's source an seems to be right. Links point to
"<cid:xxxx>" and all images are emebedded in source. What can be this
problem?

thanks
 
W

Walter Wang [MSFT]

Hi Trapulo,

What's the image's file type? such as a GIF, JPG, PNG? 6.0 and earlier
version of IE doesn't support PNG files.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Trapulo

Hello Walter,
files are jpg or gif (alway sent with jpg mime).

I solved changing encoding of html from base64 to quoted. Howevere I've
still a problem with hotmail: only viewing the email from hotmail I can see
some (every the same) images, but not all. From outlook, OE, gmail, etc. all
ok. Any idea?

thanks
 
W

Walter Wang [MSFT]

Hi Trapulo,

Do you mean that some images will always show fine when viewed in hotmail,
but some other will always show incorrectly?

Is it possible to send me a simple but complete project to reproduce the
issue?

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

Walter Wang said:
Hi Trapulo,

Hi Walter, I've received your email: I didn't reply because viewing this
thread by outlook express I can't see your last message :( Now I'm using web
interface, where thread is complete..

Do you mean that some images will always show fine when viewed in hotmail,
but some other will always show incorrectly?

yes
Is it possible to send me a simple but complete project to reproduce the
issue?

Thank you, but I solved. There is a bug in hotmail, related to images file
name length. Now hotmail displays all images embedded in my emails.

Thank you anyway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top