Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending e-mails without virus warning...

Status
Not open for further replies.

VisualGuy

Programmer
May 27, 2003
162
0
0
US
I am trying to send an e-mails through VB without having to receive a warning message about virus'. Here is my code:

Dim oitem As Outlook.MailItem
Dim oitems As Items
Dim oOutlook, objInbox As Object
Dim tTo, tBody, tSubject, tAttachment As String

tTo = "will.sher@someplace.com"
tBody = "This is just a test"
tSubject = "My test"
tAttachment = "c:\garbage.doc"

Set oOutlook = New Outlook.Application

'Set oitems = objInbox.Items

Set oitem = oOutlook.CreateItem(olMailItem)

With oitem
.To = tTo
.Body = tBody
.Subject = tSubject
.Attachments.Add tAttachment
.Send
End With

I can't seem to find any information that will handle this, but I know it exists. Can this be done without having to change my code around too much?
 
The messages can't be turned off if accessing the Outlook or CDO object models. Applies to OL2000 SR-2 and later.

If Outlook is in c/w mode there's an admin kit that can be installed on Exchange Server to allow the object model guard to be customised. Details at
Alternatively, check out Dimitri's Redemption control at
Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top