Outlook VBScript caught as Virus by Symantec every time

I

ITIntelligence

Hi, everyone, just got an annoying problem :

When I run this Outlook.asp file, it generates a temporary .htm file in
Temporary Internet Folder and caught as BloodHound Virus by Symantec
every time. Is there a way out, thanks a lot.

<script language="vbscript">
Option Explicit

Const olMailItem = 0
Const olOriginator = 0

'------------------------------------------------------------------------------
Sub SendMailOutlook(strTo, strSubject, strTextBody, strAttachment)

'Create an Outlook object
Dim objOutlook
Dim session
Dim al
Set objOutlook = CreateObject("Outlook.Application")
' The following 2 lines seem pointless but solve the problem discussed
in MS KB329765
' the issue is a security warning dialog appears about a program
accessing Outloook address list (i.e may be a virus etc)
Set session = objOutlook.Session ' create persistent Outlook session
to avoid security dialog
Set al = objOutlook.session.addressLists("Global Address List")

'Create a new message
Dim objMessage
'Set objMessage = objOutlook.session.CreateItem(olMailItem)
Set objMessage = objOutlook.CreateItem(olMailItem)

With objMessage
.Recipients.Add (strTo)
.Subject = strSubject
.Body = strTextBody
if Len(strAttachment) > 2 then
.attachments.add (strAttachment)
end if
.ReadReceiptRequested = TRUE
.Display
End With

Set objMessage = nothing
Set objOutlook = nothing

End Sub 'SendMailOutlook
'------------------------------------------------------------------------------
</script>


<%
Response.write("<script language=""vbscript"">" & Chr(10))
Response.write("Dim strTo" & Chr(10))
Response.write("Dim strSubject" & Chr(10))
Response.write("Dim strMessage" & Chr(10))
Response.write("Dim strAttachment" & Chr(10))
Response.write("strTo = """ & request("to") & """" & Chr(10))
Response.write("strSubject = """ & request("subject") & """" &
Chr(10))
Response.write("strMessage = """ & request("message") & """" &
Chr(10))
Response.write("strAttachment = """ & request("attachment") & """" &
Chr(10))
Response.write("Call SendMailOutlook (strTo, strSubject, strMessage,
strAttachment)" & Chr(10))
Response.write("</script>" & Chr(10))
%>

<script language="Javascript">
// self.close();
</script>
 
H

Hollis Paul [MVP - Outlook]

' the issue is a security warning dialog appears about a program
accessing Outloook address list (i.e may be a virus etc)
Set session = objOutlook.Session ' create persistent Outlook session
to avoid security dialog
Set al = objOutlook.session.addressLists("Global Address List")
Probably the most reasonable thing to do is to use Redemption objects.
See www.dimastr.com/redemption
 
S

Sue Mosher [MVP-Outlook]

Check to see whether the Symantec application has an option to turn off script blocking.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

rewriting with refresh 1
Outlook from Access 0
Request for help with VBScript... 4
Access Login Function 0

Top