473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SmtpMail with content id

Hello,

I'm trying to send an email message using c#'s SmtpMail class.
Everything, including attachments, is working properly.
My problem is this: I need to assign a content id to one of the parts of the
multipart email, for example, in order to show an embedded image:
<img src=cid:xxxx>.

How can I assign a content ID in c#?

Please cc to my mailbox: oh**@usbphone.com

Thanks a lot,
Ohad Asor.
Nov 16 '05 #1
2 2737
you can't do that with SmtpMail class

i've got a class I've written to send Smtp messages, with auth and inline
attachments but I'm a bit reluctant to dish the complete class out.

I've just done a quick search, here's a really good article (and source) on
how to do it
http://www.codeproject.com/csharp/smtpemailer.asp

HTH
Sam

"Ohad" <oh**@usbphone.com> wrote in message
news:ct**********@news2.netvision.net.il...
Hello,

I'm trying to send an email message using c#'s SmtpMail class.
Everything, including attachments, is working properly.
My problem is this: I need to assign a content id to one of the parts of
the multipart email, for example, in order to show an embedded image:
<img src=cid:xxxx>.

How can I assign a content ID in c#?

Please cc to my mailbox: oh**@usbphone.com

Thanks a lot,
Ohad Asor.

Nov 16 '05 #2
I think you can't do it.c#'s smtpmail seems using CDO.Why do you want to
assign content ID?
If you want to embedded a image,you can just save your mail as HTML and use
CDO to do it,just as a com object.
You can read MSDN for more details.good luck

"Ohad" <oh**@usbphone.com> 写入消息新闻:ct**********@news2.netvision.net.il.. .
Hello,

I'm trying to send an email message using c#'s SmtpMail class.
Everything, including attachments, is working properly.
My problem is this: I need to assign a content id to one of the parts of
the multipart email, for example, in order to show an embedded image:
<img src=cid:xxxx>.

How can I assign a content ID in c#?

Please cc to my mailbox: oh**@usbphone.com

Thanks a lot,
Ohad Asor.

Nov 16 '05 #3

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

Similar topics

7
by: Jason | last post by:
Hi just a really quick simple question. Can you configure SmtpMail class in C# to use a different port? or does it have to be port 25? Thanks Jason
0
by: Ohad | last post by:
Hello, I'm trying to send an email message using c#'s SmtpMail class. Everything, including attachments, is working properly. My problem is this: I need to assign a content id to one of the...
5
by: ElanKathir | last post by:
Hi ! I wrote one code for Send the E-mail, But that code have some problem , So please help me Here i paste my code and Error: Error: Server Error in '/Elan_Sample' Application. ...
2
by: Edward | last post by:
Hello, everybody, I tried to send Email out using ASP.NET, but failed, here is the code of sending: -------------------------------------------------------------------------------- Try...
1
by: Jens 脴ster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception 鈥淐ould not access 'CDO.Message' object鈥 when I call SmtpMail.Send. This only happens when I send...
3
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception 鈥淐ould not access 'CDO.Message' object鈥 when I call SmtpMail.Send. This only happens when I send...
17
by: LACH | last post by:
When I sent e-mail from within my asp.net application to Hotmail adresses. The e-mail always end up in Junk e-mail. I sent the e-mail as plain/text. Does anyone know how to solve this?
9
by: Russell Stevens | last post by:
I generate pdf files on my server and allow users to access them via a browser and also email them. Most files work fine whether the user uses his browser or gets an email with a pdf attachment...
2
by: joseph2000 | last post by:
Hi, I have problem with e-mails which are being send via System.Web.Mail.SmtpMail class but before describing the problem itself first I'd like to show shortly what I'm doing on the server. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.