'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
Dim SmtpServer As SMTP
End Sub
Sub AppStart (Args() As String)
CallSubDelayed(Me, "EnviarCorreo")
StartMessageLoop
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Private Sub EnviarCorreo
SmtpServer.Initialize("smtp.fibertel.com.ar", 25, "crisxxxxx@fibertel.com.ar","xxxxxx","SMTP")
SmtpServer.To.Add("crisxxxxx@gmail.com")
SmtpServer.Subject = "Prueba de Envio"
SmtpServer.Body = "Prueba Prueba Prueba Prueba"
SmtpServer.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
If Success Then
Log("*** OK ***")
Else
Log("*** Error ***")
End If
End Sub