473,480 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.NET equivilent of CDO AttachURL ?

In asp you could use the attachmail method to embed an image in an html
email that would not show it as an attachment (no icon at the top in
outlook).

In .net I can create an email and attach images and have them display in the
email, but they are also shown as attachments (icon is displayed at top).

Is there anyway to get the same result as attachurl in .net ?

Thanks,

Ricci.
Jul 21 '05 #1
2 1781
Hi Ricci,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to embed an image into you
HTML format mail. If there is any misunderstanding, please feel free to let
me know.

As far as I know, there isn't a managed class that can let us achieve this
in current version of .NET framework. We have two choices.

1. Use a third-party .net component. The www.aspNetEmail.com component has
the EmailMessage.EmbedImage() method to do this for you.

2. Use CDO interop. COM components offer more features than the built-in
System.Web.Mail. If you use CDOEX (CDO for Exchange 2000)/CDOSYS (CDO for
Windows 2000/.NET) you can use the CreateHTMLBody method of the CDO.Message
object which will and the whole HTML page and automatically embed the
images.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2
Thanks for your response.

I worked out the header that gives the result I want:

Content-Location: Logo.jpg

I have not found a way to set it for the attachment using the framework yet
(not even sure it is possible to edit the headers). But I use /n software's
ip*works and that comes with a mime control, this allows you to modify the
attachment headers so I have got it working with that.

Regards,

Ricci.
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:6b**************@cpmsftngxa10.phx.gbl...
Hi Ricci,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to embed an image into you
HTML format mail. If there is any misunderstanding, please feel free to
let
me know.

As far as I know, there isn't a managed class that can let us achieve this
in current version of .NET framework. We have two choices.

1. Use a third-party .net component. The www.aspNetEmail.com component has
the EmailMessage.EmbedImage() method to do this for you.

2. Use CDO interop. COM components offer more features than the built-in
System.Web.Mail. If you use CDOEX (CDO for Exchange 2000)/CDOSYS (CDO for
Windows 2000/.NET) you can use the CreateHTMLBody method of the
CDO.Message
object which will and the whole HTML page and automatically embed the
images.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3118
by: Darren | last post by:
Hi. I have a javascript menu system which uses the "elementFromPoint" function. However Netscape/Mozilla doesn't recognise this function. Does it have an equivilent? Thanks -- Darren
1
2451
by: Dica | last post by:
if i needed to embed a graphic in my email, i could use CDONTS's attachURL method. since attachURL isn't supported with CDO.Message, what can i use to embed graphics? tks
2
21727
by: John Galt | last post by:
I was looking at a VB.NET program that is passing strings to method calls using ByVal. I was wondering if this is for a reason and, if so, should a C# conversion of code samples from VB.NET also...
4
3556
by: trint | last post by:
I can't find the followings equivilent: flashPlayer.Movie = Application.StartupPath + @"/Cooler2.swf"; flashPlayer.FSCommand +=new...
2
1497
by: Steve1 via DotNetMonster.com | last post by:
Hi all, I'm producing a data conversion app in C#. I have the code already written in VB6. I would to know if anyone knows of any links that shows the VB6 function/syntax equivilent in C#? ...
1
4853
by: Ryan Ternier | last post by:
I'm trying to find an equivilent function to VB's DatePart function. I have a Year, Month, the Day of week (Sunday, monday etc.) and the week (week 1, week 2) and I need to find the date of that...
0
872
by: Arjan Pot | last post by:
Hello, In classic ASP I used CDONTS and the AttachUrl function to embed images. This seems to not to be available in framework 1.1 - System.Web.Mail. Is there a workaround ? Is this by design...
2
390
by: Ricci Hammond | last post by:
In asp you could use the attachmail method to embed an image in an html email that would not show it as an attachment (no icon at the top in outlook). In .net I can create an email and attach...
4
6457
by: MikeLing | last post by:
Hi, String.IndexOf is case sensitive so I need to covert to lower before testing the string contains a given string. In VB this is: Instr(Lcase(StringToTest, "StringToCheckFor")) What is...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6730
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4767
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.