Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to send email
Message
From
05/01/2003 13:33:28
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Trying to send email
Miscellaneous
Thread ID:
00738172
Message ID:
00738172
Views:
68
I've been trying to send email messages in VB.Net with no luck. I have seen examples of doing so, but can't get them to work.

My computer is running XP Pro.

The code is ...

Imports System
Imports System.Reflection
Imports System.Web.Mail
Imports System.Windows.Forms

Module ModEmail
Public golapp As Outlook.Application
Public golNameSpace As Outlook.NameSpace

Sub SendTheMail()

Dim oApp As Outlook.Application
Dim omail As Outlook.MailItem

oApp = New Outlook.Application()
omail = oApp.CreateItem(Outlook.OlItemType.olMailItem)
omail.To = "Someone@abc.com"
omail.Subject="Trying to send email"
omail.Body="This is the body"
omail.Send()
omail = Nothing
oApp = Nothing
End Sub
End Module

I get the squiggly line under omail.send() with the following error buring the build;

'Send' is ambiguous across the inherited interfaces 'Outlook._MailItem' and 'Outlook.ItemEvents_10_Event'.

Thanks for any help,
Carl
Next
Reply
Map
View

Click here to load this message in the networking platform