Error: Variable must be of type "Object" (AYUDA)
Publicado: 31 Jul 2012, 22:30
Código: Seleccionar todo
;#NoTrayIcon ;Ocultar el icono en la barra de tareas
_SendEmail("[email protected]", "[email protected]", "Asunto", "aqui escribes tu el cuerpo del correo")
Func _SendEmail($e_Sender, $e_Recipient, $e_Subject, $e_Text)
Local $objMessage = ObjCreate("CDO.Message")
$objMessage.Subject = $e_Subject
$objMessage.Sender = $e_Sender
$objMessage.From = $e_Sender
$objMessage.To = $e_Recipient
$objMessage.TextBody = $e_text
$objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.ivermedia.com"
$objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[email protected]"
$objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "cvkjsp0lvk9"
$objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
$objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
$objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
$objMessage.Configuration.Fields.Update
$objMessage.Send
Return
EndFunc