We are trying to set MailMessage Content-Type to be text/calendar
The following code has been used:
string subject = "Calendar test 3";
MailMessage emailMessage = new MailMessage();
emailMessage.To = <address>
emailMessage.Su bject = "my subject";
emailMessage.He aders.Add("Cont ent-Type","text/calendar;method =\"REQUEST\"" );
emailMessage.Bo dy=@"BEGIN:VCAL ENDAR
PRODID:-//ACME/DesktopCalendar//EN
METHOD:REQUEST
VERSION:2.0.... <the rest of iCalendar>
";
MailService.Sen d(emailMessage) ;
Even though the content-type was specified in Headers collection the
resulting message still contains "text/plain" content-type.
Please help.
Vlad 5 2107
You probably need to set the BodyFormat property on your MailMessage
object to get the content-type to what you want.
Example:
MailMessage mail = new MailMessage();
mail.To = <address>
mail.From = <address>
mail.Subject = emailSubject;
mail.BodyFormat = System.Web.Mail .MailFormat.Htm l;
Hope that helps http://www.harleyc.com
Vlad wrote: We are trying to set MailMessage Content-Type to be text/calendar The following code has been used: string subject = "Calendar test 3"; MailMessage emailMessage = new MailMessage(); emailMessage.To = <address> emailMessage.Su bject = "my subject"; emailMessage.He aders.Add("Cont ent-Type","text/calendar;method =\"REQUEST\"" ); emailMessage.Bo dy=@"BEGIN:VCAL ENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST VERSION:2.0.... <the rest of iCalendar> "; MailService.Sen d(emailMessage) ;
Even though the content-type was specified in Headers collection the resulting message still contains "text/plain" content-type.
Please help.
Vlad
I dont think it has anything to do with HTML/Plain text. Content-type is
email header--not HTTP header. I tried it anyways just to be safe and got
the same results - plain text.
Still need MSFT help with this!
<gu*********@ho tmail.com> wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.com.. . You probably need to set the BodyFormat property on your MailMessage object to get the content-type to what you want.
Example:
MailMessage mail = new MailMessage(); mail.To = <address> mail.From = <address> mail.Subject = emailSubject; mail.BodyFormat = System.Web.Mail .MailFormat.Htm l;
Hope that helps
http://www.harleyc.com
Vlad wrote: We are trying to set MailMessage Content-Type to be text/calendar The following code has been used: string subject = "Calendar test 3"; MailMessage emailMessage = new MailMessage(); emailMessage.To = <address> emailMessage.Su bject = "my subject"; emailMessage.He aders.Add("Cont ent-Type","text/calendar;method =\"REQUEST\"" ); emailMessage.Bo dy=@"BEGIN:VCAL ENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST VERSION:2.0.... <the rest of iCalendar> "; MailService.Sen d(emailMessage) ;
Even though the content-type was specified in Headers collection the resulting message still contains "text/plain" content-type.
Please help.
Vlad
I believe that if the email reader does not support the "text/calendar"
type, it is probably converting it to "text/plain". Why email reader are
you using? If you have a web access email account, you might try sending an
email to that account and view it in something like FireFox which supports
"text/calendar".
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Vlad" <Vl**@community .nospam> wrote in message
news:ex******** ******@TK2MSFTN GP04.phx.gbl... I dont think it has anything to do with HTML/Plain text. Content-type is email header--not HTTP header. I tried it anyways just to be safe and got the same results - plain text.
Still need MSFT help with this!
<gu*********@ho tmail.com> wrote in message news:11******** **************@ i39g2000cwa.goo glegroups.com.. . You probably need to set the BodyFormat property on your MailMessage object to get the content-type to what you want.
Example:
MailMessage mail = new MailMessage(); mail.To = <address> mail.From = <address> mail.Subject = emailSubject; mail.BodyFormat = System.Web.Mail .MailFormat.Htm l;
Hope that helps
http://www.harleyc.com
Vlad wrote: We are trying to set MailMessage Content-Type to be text/calendar The following code has been used: string subject = "Calendar test 3"; MailMessage emailMessage = new MailMessage(); emailMessage.To = <address> emailMessage.Su bject = "my subject"; emailMessage.He aders.Add("Cont ent-Type","text/calendar;method =\"REQUEST\"" ); emailMessage.Bo dy=@"BEGIN:VCAL ENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST VERSION:2.0.... <the rest of iCalendar> "; MailService.Sen d(emailMessage) ;
Even though the content-type was specified in Headers collection the resulting message still contains "text/plain" content-type.
Please help.
Vlad
Actually we use MS Outlook 2003 which does support it. We tried it with a
custom third-party component that sets the header fine. However when we did
it through .NET native component it didn't work.
--
Vlad
P.S. Please remove "REMOVETHIS " from my email address to reply...
"Christophe r Reed" <ca****@nospam. nospam> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. .. I believe that if the email reader does not support the "text/calendar" type, it is probably converting it to "text/plain". Why email reader are you using? If you have a web access email account, you might try sending an email to that account and view it in something like FireFox which supports "text/calendar". -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Vlad" <Vl**@community .nospam> wrote in message news:ex******** ******@TK2MSFTN GP04.phx.gbl...I dont think it has anything to do with HTML/Plain text. Content-type is email header--not HTTP header. I tried it anyways just to be safe and got the same results - plain text.
Still need MSFT help with this!
<gu*********@ho tmail.com> wrote in message news:11******** **************@ i39g2000cwa.goo glegroups.com.. . You probably need to set the BodyFormat property on your MailMessage object to get the content-type to what you want.
Example:
MailMessage mail = new MailMessage(); mail.To = <address> mail.From = <address> mail.Subject = emailSubject; mail.BodyFormat = System.Web.Mail .MailFormat.Htm l;
Hope that helps
http://www.harleyc.com
Vlad wrote: We are trying to set MailMessage Content-Type to be text/calendar The following code has been used: string subject = "Calendar test 3"; MailMessage emailMessage = new MailMessage(); emailMessage.To = <address> emailMessage.Su bject = "my subject"; emailMessage.He aders.Add("Cont ent-Type","text/calendar;method =\"REQUEST\"" ); emailMessage.Bo dy=@"BEGIN:VCAL ENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST VERSION:2.0.... <the rest of iCalendar> "; MailService.Sen d(emailMessage) ;
Even though the content-type was specified in Headers collection the resulting message still contains "text/plain" content-type.
Please help.
Vlad
Actually we use MS Outlook 2003 which does support it. We tried it with a
custom third-party component that sets the header fine. However when we did
it through .NET native component it didn't work.
"Christophe r Reed" <ca****@nospam. nospam> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. .. I believe that if the email reader does not support the "text/calendar" type, it is probably converting it to "text/plain". Why email reader are you using? If you have a web access email account, you might try sending an email to that account and view it in something like FireFox which supports "text/calendar". -- Christopher A. Reed "The oxen are slow, but the earth is patient."
"Vlad" <Vl**@community .nospam> wrote in message news:ex******** ******@TK2MSFTN GP04.phx.gbl...I dont think it has anything to do with HTML/Plain text. Content-type is email header--not HTTP header. I tried it anyways just to be safe and got the same results - plain text.
Still need MSFT help with this!
<gu*********@ho tmail.com> wrote in message news:11******** **************@ i39g2000cwa.goo glegroups.com.. . You probably need to set the BodyFormat property on your MailMessage object to get the content-type to what you want.
Example:
MailMessage mail = new MailMessage(); mail.To = <address> mail.From = <address> mail.Subject = emailSubject; mail.BodyFormat = System.Web.Mail .MailFormat.Htm l;
Hope that helps
http://www.harleyc.com
Vlad wrote: We are trying to set MailMessage Content-Type to be text/calendar The following code has been used: string subject = "Calendar test 3"; MailMessage emailMessage = new MailMessage(); emailMessage.To = <address> emailMessage.Su bject = "my subject"; emailMessage.He aders.Add("Cont ent-Type","text/calendar;method =\"REQUEST\"" ); emailMessage.Bo dy=@"BEGIN:VCAL ENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST VERSION:2.0.... <the rest of iCalendar> "; MailService.Sen d(emailMessage) ;
Even though the content-type was specified in Headers collection the resulting message still contains "text/plain" content-type.
Please help.
Vlad
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Simran |
last post by:
I need to set up an automated email system , which means users should
not be able to respond back to the emails but at the same time, we
need to track bounced emails. This is important as our customers are
paying for this service, so we need to track the bounced email Id's.
This is the code which I have tried:-
MailMessage msgRequest = new MailMessage();
msgRequest.BodyFormat = MailFormat.Text;
msgRequest.Subject = "Do Not reply to...
|
by: Richard Bogle |
last post by:
Hi,
MailMessage.From allows me to set the email address that the message comes
from but not the "covering address" (sorry, no idea what the correct
terminology might be).
The email message should have the To: field appear as "Joe Bloggs" rather
than the plain e-mail address.
Any ideas?
|
by: Wade Wegner |
last post by:
Hello,
Using the MailMessage class (or any other ASP.NET SMTP classes), I would
like to programmatically request a read receipt. Is this possible?
I have found an article that talked about a ReadReceipt property for CDO
1.2.1, but I have not been able to find a ASP.NET or MailMessage article
that specifically deals with this issue. Additionally, it appears that
utilizing an Outlook object this is also possible, but this system will...
|
by: gh0st54 |
last post by:
Hi
i'm looking for how to change the date of out going messages
i tried this but it doesn't seems to work
static public bool SendEmail(string To, string From, string Subject,
string Body, System.Web.Mail.MailFormat Format) {
bool bReturn = false;
|
by: MSG Servicos de Informatica |
last post by:
Hi MSDN Team!
I have a doubt about the "MailMessage" class in Framework .NET 1.1.
My SMTP server works in a local network that no have access to the internet
for security reasons. And in my network we have an application that send
emails to other department inside the company using us SMTP server that
requires authentication...
I'd like to know why when I use the "MailMessage" Class with "SMTPServer"
class to authenticate in my SMTP...
| |
by: Scott Townsend |
last post by:
I'm trying to send an email and get a delivery receipt back. I'm setting
the MailMessage.DeliveryNotificationOptions =
DeliveryNotificationOptions.OnSuccess and it works great for the First email
that is sent. Any emails after the first do not generate a Delivery Receipt.
I've tries Creating multiple MailMessages and SMTPClients, though even with
two of each DIMed I only get the one Delivery Receipt. If I set each Client
to a Different...
|
by: asnowfall |
last post by:
I am creating MailMessage out of already existing email message.
My existing message has few custom properties. I wan to add them to
System.Net.Mail.MailMessage
How to add custom properties?
I was thinking adding custom properties to
System.Net.Mail.MailMessage.Headers. but it's a READONLY property.
System.Net.Mail.MailMessage has few header fields as properties (eg:
FROM, TO, CC) and these are not sufficient.
|
by: jwinn |
last post by:
Is there any way to change the sensitivity level of a message by modifying
the MailMessage.Headers collection? We're using an Exchange server here and I
would rather not use VSTO at all since the application doing the mailing is a
Windows Service.
Also, I'm using VS2003 and 2005 at the moment.
Thanks!
|
by: travispennington |
last post by:
To anyone that can assist me: I deeply appreciate your help!!
I am developing an application with an outside vendor. The vendor has
a very odd requirement. They need custom X-Headers added to an email
received by their system. That's not the odd part. The oddity is
they want to have a single X-Header containing multiple keys and
values that are delimited by a carriage return, line feed and tab.
The vendor claims other customers...
|
by: =?Utf-8?B?YmVuamk=?= |
last post by:
Hi,
Working with VB.NET 2005. I've got a mailmessage object and I set it up so
that when the recipient replies, the reply address is a string of two
different email addresses together. I used a line like the following:
mymessage.Headers.Add(addressone + "," + addresstwo)
Everything worked as expected when running on framework 2.0. However, after
installing 2.0 SP1, the behavior broke. This header was stripped out of the
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |