How do I email an image with RenderControl

N

needin4mation

Hi, I am using RenderControl to send the contents of my aspx DataGrid,
etc. from my form. In this form there is an image. The image resides
on the server. It has a url of ./mypic.jpg. Because of this when the
email is generated the picture is not shown in the resulting email
(just gives the x as ./isn't on their computer). Everything else is
fine because it is just html. But what if I want binary data like the
image? How can I get that and email it? Thanks for any guidance.
 
B

Ben Dewey

You have to use a fullly qualified URL for an image in an email. Search the
net for ASP.NET fully qualified URL. You're gonna want to do something with
the Request.ServerVariables["SERVER_NAME","SERVER_PORT", and/or
"SERVER_PORT_SECURE"]
 
N

needin4mation

The person receiving the email may not have access to the location. Is
there another way? GDI+?
 
B

Bruce Barker

the image is included in the mail body using Multipart/Related content
type, very simular to an attachement see the rfc:

ftp://ftp.ietf.org/rfc/rfc2387.txt

the exchange sdk supports this thru the AddReleatedBodyPart method.


-- bruce (sqlwork.com)
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top