Re: VB.Net and Outlook
From: Nick Malik [Microsoft] (nickmalik_at_hotmail.nospam.com)
Date: 01/12/05
- Next message: Tim Wilson: "Re: How do I modify colors like Windows does to make 3D border slightly darker or lighter?"
- Previous message: jrhoads23_at_hotmail.com: "How do I modify colors like Windows does to make 3D border slightly darker or lighter?"
- In reply to: John: "Re: VB.Net and Outlook"
- Next in thread: Joseph MCAD: "Re: VB.Net and Outlook"
- Reply: Joseph MCAD: "Re: VB.Net and Outlook"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 08:00:07 -0800
You are using an ActiveX control to send mail. I can't see that you are
using Outlook functionality per se.
I suggest that you recode this segment of the code to use the .Net
framework. ActiveX controls have security issues, and XP SP2 has specific
settings the can prevent an ActiveX control from loading.
You can use the System.Web.Mail classes to send e-mail or you can use one of
the open source or free .Net e-mail classes that don't require CDO under the
covers.
I stumbled on this one using google. Haven't tried it myself. There's an
open source smtp component on sourceforge as well.
http://www.dnzone.com/ShowDetail.asp?NewsId=674
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"John" <John@discussions.microsoft.com> wrote in message
news:E71DFE7D-93C4-49B7-8408-A0FD41486F22@microsoft.com...
> It is written in VB.Net 2002. It is a windows Application, not a Web app.
I
> don't know about the .Net classes for sending email...I am using the
> Microsoft Outlook 11.0 Object Library. Code follows:
>
> Dim olApp As Outlook.Application
> olApp = CreateObject("Outlook.Application")
> Dim olNs As Outlook.NameSpace
> olNs = olApp.GetNamespace("MAPI")
> olNs.Logon()
> Dim olMail As Outlook.MailItem
> olMail = olApp.CreateItem(Outlook.OlItemType.olMailItem)
> olMail.To = lsTo
> olMail.Subject = lsTitle
> olMail.Body = lsBody
> CType(olMail, Outlook._MailItem).Send()
>
>
> "Nick Malik [Microsoft]" wrote:
>
> > please provide more information about the app. You said it is written
in
> > vb.net. Is it a rich client app or a web app? Are you using the .net
> > classes for sending mail? Can you post a snippet of code?
> >
> > --
> > --- Nick Malik [Microsoft]
> > MCSD, CFPS, Certified Scrummaster
> > http://blogs.msdn.com/nickmalik
> >
> > Disclaimer: Opinions expressed in this forum are my own, and not
> > representative of my employer.
> > I do not answer questions on behalf of my employer. I'm just a
> > programmer helping programmers.
> > --
> > "John" <John@discussions.microsoft.com> wrote in message
> > news:276775AB-667A-4AA7-BE9B-999246CEFF1E@microsoft.com...
> > > Having a problem sending emails through vb.net. Our inhouse software
> > > automatically sends an email to the programming staff whenever an
error is
> > > encountered.
> > >
> > > This code works just fine on machines that are windows 2000 based. We
> > > recently upgraded from Outlook 2000 to Outlook 2003, and it still
works.
> > >
> > > We have one machine with XP service pack 1. It works fine there. This
also
> > > was upgraded from outlook 200 to outlook 2003.
> > >
> > > On two new machines, we have XP Service Pack 2. They came with outlook
> > 2003,
> > > so no upgrade was needed. On these machines, we get an error stating
that
> > > "modAgentSys can not create activex component" which then crashes the
> > program.
> > >
> > > Any ideas?
> > >
> >
> >
> >
- Next message: Tim Wilson: "Re: How do I modify colors like Windows does to make 3D border slightly darker or lighter?"
- Previous message: jrhoads23_at_hotmail.com: "How do I modify colors like Windows does to make 3D border slightly darker or lighter?"
- In reply to: John: "Re: VB.Net and Outlook"
- Next in thread: Joseph MCAD: "Re: VB.Net and Outlook"
- Reply: Joseph MCAD: "Re: VB.Net and Outlook"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|