mafiaboy

Please help me Crying I must send mail by c# and visual studio 2003 so i can't use VSTO for 2005 and also can' t use some tool that require liences.

And more importance I must use COM by way access to Outlook 2003 to send mail.

I got it but the big problem is ... security .. warning messages that i need access then mail will delivery +_+ it is big problem. So anyone here can help me. I research about outlook very much so i knew that .... create Add-in project and it ok ( because it will trusted with outlook). And another way is use VSTO for it but .. you know i can' t use visual studio 2005 Crying .

So how i can do it



Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

Chris Beiter - MSFT

Hi mafiaboy,

Your question appears to be related directly to Outlook and VSTO, not Office Live. You should try the newsgroups for Outlook to get a faster response. This discussion board is for Office Live development only.

Here are a few that may be a better fit for the information you are seeking:

Outlook Programming Add-ins Newsgroup

Outlook Programming Forms Newsgroup

Thanks,

Chris






Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

Chris Beiter - MSFT

Moved to the VSTO forum.






Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

Sue Mosher - Outlook MVP

You already answered your own question: You need to build an Outlook COM add-in. Since you can't use VSTO, you need to use the IDTExtensibility2 (shared add-in) interface. If you derive all Outlook objects from the Outlook.Application object passed as an argument by the OnConnection event, properties and methods of those objects won't trigger security prompts.





Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

mafiaboy

Oh ! I really a new in here so i quite bad for choose box for discuss. sorry all. And many thank Sue Mosher about your help

your answer demonstrate that you expert in program with outlook . Because i spend more than one week to research about program with outlook. Now find the solution for my problem. It isn't COM for send Meeting request mail Smile I can use ICalendar or CDO to send Meeting Request mail that can avoid security of OutLook. But i alway get problem Crying it here below is my code with ICalendar :

public bool SendAppoinment(string startDate, string startTime, string endTime, string subject, string summary, string location,
string attendeeName, string attendeeEmail, string organizerEmail, string filePath)
{
const string c_strTimeFormat = "yyyyMMdd\\THHmmss\\Z";
string strStartTime="";
string strEndTime="";
string strTimeStamp="";
string strTempStartTime ="";
string strTempEndTime = "";
string vCalendarFile = "";

// VCalendar Format.
const string VCAL_FILE =
"BEGIN:VCALENDAR\n" +
"VERSION:1.0\n" +
"BEGIN:VEVENT\n" +
"DTSTART{0}\n" +
"DTEND{1}\n" +
"LOCATION;ENCODING=QUOTED-PRINTABLE:{2}\n" +
"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:{3}\n" +
"SUMMARY;ENCODING=QUOTED-PRINTABLE:{4}\n" +
"TRIGGER:-PT15M\n" +
"PRIORITY:3\n" +
"END:VEVENT\n" +
"END:VCALENDAR" ;

try
{

DateTime dtmStartDate = DateTime.Parse(startDate.ToString());
DateTime dtmStartTime = DateTime.Parse(startDate + " " + startTime.ToString());
DateTime dtmEndTime = DateTime.Parse(startDate + " " + endTime.ToString());
strTempStartTime = string.Format("{0} {1}",
dtmStartDate.ToShortDateString(),dtmStartTime.ToLongTimeString());
strTempEndTime = string.Format("{0} {1}",
dtmStartDate.ToShortDateString(),dtmEndTime.ToLongTimeString());
strTimeStamp = (DateTime.Parse(strTempStartTime)).ToUniversalTime().ToString(c_strTimeFormat);
strStartTime = string.Format(":{0}", strTimeStamp);
strEndTime = string.Format(":{0}",
(DateTime.Parse(strTempEndTime)).ToUniversalTime().ToString(c_strTimeFormat));

vCalendarFile =
String.Format(VCAL_FILE, strStartTime, strEndTime, location, summary, subject , strTimeStamp, attendeeEmail.Trim() , "thang.pham@sea-solutions.com", attendeeName.Trim(), attendeeEmail.Trim(), organizerEmail.Trim());

//filePath += "\\" + subject+ ".ics";
//TextWriter tw = new StreamWriter(filePath);

// write a line of text to the file
//tw.WriteLine(vCalendarFile.ToString());

// close the stream
//tw.Close();

// Create object for sending mails

MailMessage mail = new MailMessage();
mail.To = attendeeEmail.Trim();
mail.From = organizerEmail.Trim();
mail.Subject = "You have got a Appointment.";

// create the attachment
//MailAttachment attachment = new MailAttachment(filePath, MailEncoding.UUEncode);
// Attach
//mail.Attachments.Add( attachment );
SmtpMail.SmtpServer = _smtpServer; // _smtpServer i don't know what is this Crying and it error in here when compile
SmtpMail.Send(mail);

}
catch (Exception ex)
{
throw new Exception(ex.Message + "for email address : " + attendeeEmail.Trim() + ";"
,ex.InnerException);
}
return true;
}



Please help me one more time. Anyone who help me i swear that will help you any problem in asp.net with C# because i expert in it Smile.

Many thank everybody





Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

Sue Mosher - Outlook MVP

It looks like you're using System.Web.Mail from .NET 1.0, in which case the SMTP server is the address of the mail server that the user can send through, e.g. "smtp.mydomain.com." See http://www.systemwebmail.com/

This discussion has strayed pretty far afield from VSTO, so if you want to pursue it further, you ought to take it up in a general C# programming forum.





Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

mafiaboy

Ok i found it too Smile thanks Sue (it is Outgoing mail server). Speak directly to you this is my real problem : My boss receive some requirement from customer, one of them is : "use ASP.NET and C#.net 2003 to send an appointment ( it mean send a meeting request mail) to update to Outlook ". When finished discuss with my boss, I and him propose a solutions is : Use COM to send Meeting Request mail Smile then i researched it. But in fact you know server computer must agree with warning security from OutLook Crying. So that i try send Meeting Request by ICalendar but it still to send an attachment (meetintg request is attached), so people must open this mail then open an attachment to update appoinement to OutLook. So now I seem die Crying i have no solution for it. Can you show me any Idea because deadthLine is soon Crying pleaseeee help me again.

Best regards,
Mafiaboy


P/S : I search in google then i know that there are two way to send meeting request (with .net 2003) and avoid warning security, one is use ICalendar and the last is CDO ( I don' t know what is CDO but i still research it ) when i got some code demo I ran it too but error happened when compile, the below is my code : the red color is error warning is
The type or namespace name 'Appointment' does not exist in the class or namespace 'CDO' (are you missing an assembly reference )
But infact I added reference to all lib :
Microsoft ActiveX Data Objects 2.5 Library
Active DS Type Library
Microsoft CDO for Exchange 2000 Library - but in fact this lib is not exist in my computer Tongue Tied ( I'm using win XP sp2)
there is lib that i think the same is "Microsfot CDO for window 2000 Library" then i Added it Smile

Code Block

static void SendMeetingRequest(CDO.Appointment iAppt, CDO.IMailbox iMbx,
string[] strAttnMandatory, string[] strAttnOptional)
{
try
{
// Variables.
CDO.CalendarMessage iCalMsg;
CDO.Configuration Config = new CDO.Configuration();
CDO.Attendee iAttendee = new CDO.Attendee();
CDO.Person iPers = new CDO.Person();

// Set the configuration fields.
iPers = (CDO.Person)iMbx;
Config.Fields[CDO.CdoConfiguration.cdoSendEmailAddress].Value = iPers.Email;
Config.Fields[CDO.CdoConfiguration.cdoMailboxURL].Value = iMbx.BaseFolder;
Config.Fields.Update();

iAppt.Configuration = Config;

// Add required attendee(s).
long I;
for (I = 0; I <= (strAttnMandatory.Length() - 1) ; ++I)
{
Console.WriteLine("Mandatory Attendee E-Mail:" + strAttnMandatory[I]);
iAttendee = iAppt.Attendees.Add("");
iAttendee.Address = Convert.ToString(strAttnMandatory[I]);
iAttendee.Role = CDO.CdoAttendeeRoleValues.cdoRequiredParticipant;
}

// Add optional attendee(s).
for (I = 0; I <= (strAttnOptional.Length() - 1); ++I)
{
Console.WriteLine("Optional Attendee E-Mail:" + strAttnOptional[I]);
iAttendee = iAppt.Attendees.Add("");
iAttendee.Address = Convert.ToString(strAttnOptional[I]);
iAttendee.Role = CDO.CdoAttendeeRoleValues.cdoOptionalParticipant;
}

// Create the calendar message.
iCalMsg = iAppt.CreateRequest();

// Save these changes to the appointment.
iAppt.DataSource.Save();

// Send the calendar message.
iCalMsg.Message.Send();

Console.WriteLine("Meeting request sent.");
}
catch (Exception err)
{
Console.WriteLine(err.ToString());
}
}






Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

Sue Mosher - Outlook MVP

The CDO for Exchange 2000 library can create appointments, but it is relevant only if your ASP.NET web site will be running on the same server as the companies Exchange mail server. That's quite unlikely.

CDO for Windows is essentially the same as System.Web.Mail and not supported in .NET languages.

CDO 1.21 can create meeting requests. However, it is not supported in .NET languages.

I think what you have already -- and attached iCalendar file -- may be as good as you're going to get. If you could use VS 2005, you'd be able to use the System.Net.Mail namespace, which as I understand it, would let you create a multipart message that could operate as a true meeting request. (In Outlook, send a meeting request to something like a Gmail account that lets you see the raw message, and from the Gmail account, you'll be able to see what the parts look like.

In any case, this is really a topic for a dicussion forum on ASP.NET, as no Outlook programming is going to be involved in your project.





Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

mafiaboy

Anyway I still thanks you so much, because i've never met anyone who kind like you Smile in my company. Please send to me your email and your yahoo ID. I really want to make friend with you. And in future when you meet any problem that i know or my friend know i will help you because we are friends

Kind regard

mafiaboy

P/S : My real name is Thang not mafiaboy , but mafiaboy_8x is my nick name in yahoo Smile




Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

mafiaboy

Hello Sue Smile

Have a nice day my friend. I am trying with WebDAV but i don' t know how to use it below is my code, i don't know change parameter for it's default. So can you show me how
The below is code that i'm using :


Best regards,

Thang


Code Block

using System;
using System.Net;
using System.Text;
using System.IO;
using System.Xml;

namespace ExchangeSDK.Snippets.CSharp
{
class SendingAMeetingRequestWebDAV
{
[STAThread]
static void Main(string[] args)
{
// Variables.
string strExchSvrName = "";
string strMailbox = "";
string strCalendarUri = "";
string strMtgItem = "";
string strMtgRequestItem = "";
string strDomain = "";
string strUserName = "";
string strPassword = "";
string strReqAttendees = "";
string strOptAttendees = "";
string strMtgResources = "";
string strMtgRequest = "";
string strMailInfo = "";
string strCalInfo = "";
string strXMLNSInfo = "";
string strHeaderInfo = "";
bool bResult = false;
System.Net.CredentialCache MyCredentialCache = null;
string strUID = "";
string strMapiInfo = "";
string strCCInfo = "";
string strSubmissionUri = "";

try
{
// Exchange server name;
strExchSvrName = "ExchangeServer";

// Mailbox folder of the meeting organizer.
strMailbox = "user1";

// User name and password of the meeting organizer.
strUserName = "user1";
strDomain = "Domain";
strPassword = "!Password";

// Required meeting attendees.
strReqAttendees = "user1@example.com;user2@example.com";

// Optional meeting attendees.
strOptAttendees = "user3@example.com";

// Meeting resources.
strMtgResources = "meetingroom1@example.com";

// Meeting item.
strMtgItem = "testmeeting.eml";

// Meeting request item.
strMtgRequestItem = "testmeetingrequest.eml";

// URI of the user's calendar folder.
strCalendarUri = "http://" + strExchSvrName + "/exchange/"
+ strMailbox + "/Calendar/";

// Create a new CredentialCache object and fill it with the network
// credentials required to access the server.
MyCredentialCache = new System.Net.CredentialCache();
MyCredentialCache.Add( new System.Uri(strCalendarUri),
"NTLM",
new System.Net.NetworkCredential(strUserName, strPassword, strDomain)
);

// XML namespace info for the WebDAV request.
strXMLNSInfo = "xmlns:g=\"DAV:\" "
+ "xmlns:e=\"http://schemas.microsoft.com/exchange/\" "
+ "xmlns:mapi=\"http://schemas.microsoft.com/mapi/\" "
+ "xmlns:mapit=\"http://schemas.microsoft.com/mapi/proptag/\" "
+ "xmlns:x=\"xml:\" xmlns:cal=\"urn:schemas:calendar:\" "
+ "xmlns:dt=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\" "
+ "xmlns:header=\"urn:schemas:mailheader:\" "
+ "xmlns:mail=\"urn:schemas:httpmail:\"";

// Set the meeting item properties.
strCalInfo = "<cal:location>meetappt Location</cal:location>"
+ "<cal:dtstart dt:dt=\"dateTime.tz\">2004-05-19T23:00:00.000Z</cal:dtstart>"
+ "<cal:dtend dt:dt=\"dateTime.tz\">2004-05-19T23:30:00.000Z</cal:dtend>"
+ "<cal:instancetype dt:dt=\"int\">0</cal:instancetype>"
+ "<cal:busystatus>BUSY</cal:busystatus>"
+ "<cal:meetingstatus>CONFIRMED</cal:meetingstatus>"
+ "<cal:alldayevent dt:dt=\"boolean\">0</cal:alldayevent>"
+ "<cal:responserequested dt:dt=\"boolean\">1</cal:responserequested>";

// Set the required and optional attendees and meeting
// resources of the meeting.
strHeaderInfo = "<header:to>" + strReqAttendees + "</header:to>" +
"<header:cc>" + strOptAttendees + "</header:cc>" +
"<header:bcc>" + strMtgResources + "</header:bcc>";

// Set the subject of the meeting.
strMailInfo = "<mail:subject>Test Meeting Subject</mail:subject>"
+ "<mail:htmldescription>Let's meet here</mail:htmldescription>";

// Build the XML body of the PROPPATCH request.
strMtgRequest = "< xml version=\"1.0\" >"
+ "<g:propertyupdate " + strXMLNSInfo + ">"
+ "<g:set><g:prop>"
+ "<g:contentclass>urn:content-classes:appointment</g:contentclass>"
+ "<e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass>"
+ strMailInfo
+ strCalInfo
+ strHeaderInfo
+ "<mapi:finvited dt:dt=\"boolean\">1</mapi:finvited>"
+ "</g:prop></g:set>"
+ "</g:propertyupdate>";

// Create the meeting item in the organizer's calendar folder.
bResult = CreateMeeting(strCalendarUri + strMtgItem, strMtgRequest, MyCredentialCache);

if(bResult)
{
strUID = FindMeetingUID(strCalendarUri + strMtgItem, MyCredentialCache);

if("" != strUID)
{
// Set the meeting request item contentclass and outlookmessage class properties.
strCCInfo = "<g:contentclass>urn:content-classes:calendarmessage</g:contentclass>" +
"<e:outlookmessageclass>IPM.Schedule.Meeting.Request</e:outlookmessageclass>";

// Set the meeting request item MAPI properties.
strMapiInfo = "<mapi:finvited dt:dt=\"boolean\">1</mapi:finvited>" +
"<mapi:responsestatus dt:dt=\"int\">1</mapi:responsestatus>" +
"<mapi:responsestate dt:dt=\"int\">0</mapi:responsestate>" +
"<mapi:response_requested dt:dt=\"boolean\">1</mapi:response_requested>" +
"<mapi:apptstateflags dt:dt=\"int\">3</mapi:apptstateflags>" +
"<mapi:busystatus dt:dt=\"int\">1</mapi:busystatus>" +
"<mapi:intendedbusystatus dt:dt=\"int\">2</mapi:intendedbusystatus>";

// Build the XML request body of the meeting request item.
strMtgRequest = "< xml version=\"1.0\" >" +
"<g:propertyupdate " + strXMLNSInfo + ">" +
"<g:set><g:prop>" +
strCCInfo +
strMailInfo +
strCalInfo + "<cal:uid>" + strUID + "</cal:uid>" +
strHeaderInfo +
strMapiInfo +
"</g:prop></g:set></g:propertyupdate>";

// Create the meeting request item in the organizer's calendar.
bResult = false;
bResult = CreateMeeting(strCalendarUri + strMtgRequestItem,
strMtgRequest, MyCredentialCache);

if(bResult)
{
// Build the mail submission URI of the meeting organizer.
strSubmissionUri = "http://" + strExchSvrName + "/exchange/" +
strMailbox + "/##DavMailSubmissionURI##/";

// MOVE the meeting request item to mail submission URI (send
// the meeting request).
bResult = false;
bResult = SubmitMeetingRequest(strCalendarUri + strMtgRequestItem,
strSubmissionUri,
MyCredentialCache);
}
}
}
}
catch(Exception ex)
{
// Catch any exceptions.
Console.WriteLine(ex.Message);
}
}

static public bool CreateMeeting(string strMtgUri, string strMtgRequest,
System.Net.CredentialCache MyCredentialCache)
{
// Variables.
System.Net.HttpWebRequest PROPPATCHRequest = null;
System.Net.WebResponse PROPPATCHResponse = null;
byte[] bytes = null;
System.IO.Stream PROPPATCHRequestStream = null;

try
{
// Create the HttpWebRequest object.
PROPPATCHRequest = (System.Net.HttpWebRequest)HttpWebRequest.Create(strMtgUri);

// Add the network credentials to the request.
PROPPATCHRequest.Credentials = MyCredentialCache;

// Specify the PROPPATCH method.
PROPPATCHRequest.Method = "PROPPATCH";

// Set the content type header.
PROPPATCHRequest.ContentType = "text/xml";

// Encode the body using UTF-8.
bytes = Encoding.UTF8.GetBytes((string)strMtgRequest);

// Set the content header length. This must be
// done before writing data to the request stream.
PROPPATCHRequest.ContentLength = bytes.Length;

// Get a reference to the request stream.
PROPPATCHRequestStream = PROPPATCHRequest.GetRequestStream();

// Write the message body to the request stream.
PROPPATCHRequestStream.Write(bytes, 0, bytes.Length);

// Close the Stream object to release the connection
// for further use.
PROPPATCHRequestStream.Close();

// Create the appointment in the Calendar folder of the
// user's mailbox.
PROPPATCHResponse = (System.Net.HttpWebResponse)PROPPATCHRequest.GetResponse();

// Clean up.
PROPPATCHResponse.Close();

Console.WriteLine("Meeting successfully created.");

return true;
}
catch(Exception ex)
{
// Catch any exceptions. Any error codes from the PROPPATCH
// method request on the server will be caught
// here, also.
Console.WriteLine(ex.Message);

return false;
}
}

static public string FindMeetingUID(string strMtgUri,
System.Net.CredentialCache MyCredentialCache)
{
// Variables.
System.Net.HttpWebRequest PROPFINDRequest = null;
System.Net.WebResponse PROPFINDResponse = null;
byte[] bytes = null;
System.IO.Stream PROPFINDRequestStream = null;
string strUIDRequest = "";
System.IO.Stream ResponseStream = null;
XmlDocument ResponseXmlDoc = null;
XmlNodeList UIDNodes = null;
XmlElement elem = null;
XmlAttributeCollection colMultiStatusAtts = null;
string strCalendarPrefix = "";

try
{
// Build the PROPFIND request body.
strUIDRequest = "< xml version='1.0' >" +
"<a:propfind xmlns:a='DAV:'>" +
"<a:prop xmlns:uid='urn:schemas:calendar:'>" +
"<uid:uid/></a:prop>" +
"</a:propfind>";

// Create the HttpWebRequest object.
PROPFINDRequest = (System.Net.HttpWebRequest)HttpWebRequest.Create(strMtgUri);

// Add the network credentials to the request.
PROPFINDRequest.Credentials = MyCredentialCache;

// Specify the PROPPATCH method.
PROPFINDRequest.Method = "PROPFIND";

// Set the content type header.
PROPFINDRequest.ContentType = "text/xml";

// Encode the body using UTF-8.
bytes = Encoding.UTF8.GetBytes((string)strUIDRequest);

// Set the content header length. This must be
// done before writing data to the request stream.
PROPFINDRequest.ContentLength = bytes.Length;

// Get a reference to the request stream.
PROPFINDRequestStream = PROPFINDRequest.GetRequestStream();

// Write the message body to the request stream.
PROPFINDRequestStream.Write(bytes, 0, bytes.Length);

// Close the Stream object to release the connection
// for further use.
PROPFINDRequestStream.Close();

// Create the meeting in the Calendar folder of the
// user's mailbox.
PROPFINDResponse = (System.Net.HttpWebResponse)PROPFINDRequest.GetResponse();

// Get the XML response stream.
ResponseStream = PROPFINDResponse.GetResponseStream();

// Create the XmlDocument object from the XML response stream.
ResponseXmlDoc = new XmlDocument();
ResponseXmlDoc.Load(ResponseStream);

// Get the DAV:multistatus element.
elem = ResponseXmlDoc.DocumentElement;

// Get collection of xmlns attributes.
colMultiStatusAtts = elem.Attributes;

// Get the prefix for the urn:schemas:calendar: namespace.
strCalendarPrefix = "";
foreach (XmlAttribute att in colMultiStatusAtts)
{
// Attribute values are in this format: xmlns:a="DAV:"
if(-1 != att.OuterXml.IndexOf("urn:schemas:calendar:"))
strCalendarPrefix = att.OuterXml.Substring(6,1);
}

// Get the urn:schemas:calendar:uid node (there should only be one).
UIDNodes = ResponseXmlDoc.GetElementsByTagName(strCalendarPrefix + ":uid");

// Clean up.
PROPFINDResponse.Close();
ResponseStream.Close();

if(1 == UIDNodes.Count)
{
Console.WriteLine("Meeting item urn:schemas:calendar:uid found.");
return UIDNodes[0].InnerText;
}
else
{
Console.WriteLine("Meeting item urn:schemas:calendar:uid not found.");
return "";
}
}
catch(Exception ex)
{
// Catch any exceptions. Any error codes from the PROPFIND
// method request on the server will be caught
// here, also.
Console.WriteLine("Meeting item urn:schemas:calendar:uid not found. " + ex.Message);

return "";
}
}

static public bool SubmitMeetingRequest(string strMtgRequestUri, string strSubmissionUri,
System.Net.CredentialCache MyCredentialCache)
{
// Variables.
System.Net.HttpWebRequest MOVERequest = null;
System.Net.WebResponse MOVEResponse = null;

try
{
// Create the HttpWebRequest object.
MOVERequest = (System.Net.HttpWebRequest)HttpWebRequest.Create(strMtgRequestUri);

// Add the network credentials to the request.
MOVERequest.Credentials = MyCredentialCache;

// Specify the MOVE method.
MOVERequest.Method = "MOVE";

// Set the Destination header.
MOVERequest.Headers.Add("Destination", strSubmissionUri);

// Set the content type header.
MOVERequest.ContentType = "message/rfc822";

// Submit the meeting request.
MOVEResponse = (System.Net.HttpWebResponse)MOVERequest.GetResponse();

// Clean up.
MOVEResponse.Close();

Console.WriteLine("Meeting request successfully sent.");

return true;
}
catch(Exception ex)
{
// Catch any exceptions. Any error codes from the MOVE
// method request on the server will be caught
// here, also.
Console.WriteLine("Error sending meeting request: " + ex.Message);

return false;
}
}
}
}






Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

Sue Mosher - Outlook MVP

The place to ask would be in the microsoft.public.exchange.development newsgroup or on the Web at http://forums.microsoft.com/TechNet/ShowForum.aspx ForumID=838&SiteID=17. That's where the Exchange WebDAV experts would be.





Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

mafiaboy

Dear Sue Mosher,

Great man Smile you guess right. Now I must use VS2005 to send Meeting Request mail. So now I am researching it. I am reseaching about VSTO 2005 ( vsto is it free or license), anyway but I think it is Add-in app so it isn't good way for my problem (do you think so ). But in your pre answer :

" If you could use VS 2005, you'd be able to use the System.Net.Mail namespace, which as I understand it, would let you create a multipart message that could operate as a true meeting request. (In Outlook, send a meeting request to something like a Gmail account that lets you see the raw message, and from the Gmail account, you'll be able to see what the parts look like. "

I think there is another way to send meeting request mail (automatic not add-in app) by use VS2005

I think you so busy but you are an expert person in Outlook programming (I found your nick name in all forum that discuss about Outlook programming). Please send to me some links to show any ideas that you think is good idea for my problem.

Best Regards,

mafiaboy





Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

Sue Mosher - Outlook MVP

VSTO 2005 SE is a free addition to Visual Studio 2005 Professional. You would use it to build Outlook add-ins, which does not seem to be the appropriate solution for your project.

You already know that your ASP.NET project is outside the scope of this forum, and you already know that you can use iCalendar to accomplish it, right So, why not use Windows Live Search or Google to look for ASP.NET and iCalendar and see what solutions other people have come up with





Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

mafiaboy

Many thanks for your helps Smile
I am following your helps.

Best wishes for you.

Thang.




Re: Visual Studio Tools for Office Use Outlook 2003 to send meeting request using c#

mafiaboy

Hi Sue,
I am trying with VSTO to send Meeting Request mail ( or simple mail). I sent it ok Smile but ... the warning message appear it is big problem Crying you knew. So I must choose "yes" then it will run continue ( send mail or meeting request mail).
So as I researched ... an add-in app then hasn't error warning like this, but I don' t know why. Can you look my code and guess what problem :-/

Thanks so lot againt.


Code Block


Outlook.Application oApp = new Outlook.ApplicationClass();
Outlook.AppointmentItem agendaMeeting = (Outlook.AppointmentItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);

if (agendaMeeting != null)
{
agendaMeeting.MeetingStatus = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting;
agendaMeeting.Location = "Conference Room";
agendaMeeting.Subject = "Discussing the Agenda";
agendaMeeting.Body = "Let's discuss the agenda.";
agendaMeeting.Start = new DateTime(2007, 10, 24, 10, 10, 10);
agendaMeeting.Duration = 60;
Outlook.Recipient recipient = agendaMeeting.Recipients.Add("thang.pham@sea-solutions.com");
recipient.Type = (int)Outlook.OlMeetingRecipientType.olRequired;
((Outlook._AppointmentItem)agendaMeeting).Send();
}

oApp = null;
agendaMeeting = null;