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>
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>