Pessoal preciso muito de uma ajudinha com este fonte, toda vez que vou executá-lo aparece o erro acima. Ele aponta para a chamada da função na linha: Call ws_SendMail ("xxxxxxxx@xxxxxxxxxx.com.br","xxxxxxxxxxx@xxxxxxxx.com.br", "Alerta de invasão", corpo, "Alerta de invasão") Segue trecho do fonte. Sub SendMail(MFrom, muito, MSubject, MBody, MTitle)
ON ERROR RESUME NEXT
Dim iMsg
Dim iConf
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
With iConf
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.xxxxxxxxxxxx.com.br"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxxxx@xxxxxxxxx.com.br"
.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxxxxx"
.Fields.Update
End With
Set iMsg.Configuration = iConf
With iMsg
.To = muito
.From = MFrom
.Subject = MTitle
.HTMLBody = MBody
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
IF (err <> 0) Then
SendMail = err.number
Else
SendMail = 1
End IF
End Sub
Sub EnvMail(op)
dim mail, corpo, htmltext, txt
if (op = 1) then
txt = "Houve um usuário que excedeu o númerode tentativas ao tentar logar no Portal."
else
txt = "Houve um usuário que burlou a instrução SQL."
end if
corpo = "<html><head><title>Untitled Document</title><meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1""><style type=""text/css""><!--body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;background-color: #FFFFFF;}body,td,th {color: #000000;}.style1 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #FFFFFF;font-weight: bold;}.style2 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: bold;}.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }--></style></head><body><table width=""500"" border=""0"" align=""center"" cellpadding=""2"" cellspacing=""2""><tr align=""center"" bgcolor=""#36374E""><td colspan=""2""><span class=""style1"">Alerta de Invasão</span></td></tr><tr align=""center""><td height=""50"" colspan=""2""><span class=""style2"">"& txt &"</span></td></tr><tr><td width=""104"" align=""right"" class=""style2"">Web Site : </td><td width=""382""><span class=""style6"">"& Request.ServerVariables("LOCAL_ADDR") &"</span></td></tr><tr><td align=""right"" class=""style2"">Data : </td><td><span class=""style6"">"& Now() &"</span></td></tr><tr><td align=""right"" class=""style2"">IP do Cliente : </td><td><span class=""style6"">"& Request.ServerVariables("REMOTE_ADDR") &"</span></td></tr><tr><td align=""right"" class=""style2"">Login : </td><td><span class=""style6"">"& Server.HTMLEncode(login) &"</span></td></tr><tr><td align=""right"" class=""style2"">Senha : </td><td><span class=""style6"">"& Server.HTMLEncode(senha) &"</span></td></tr></table></body></html>"
Call ws_SendMail ("xxxxxxxx@xxxxxxxxxx.com.br","xxxxxxxxxxx@xxxxxxxx.com.br", "Alerta de invasão", corpo, "Alerta de invasão")
End Sub