A pointer variable that is populated by EMAIL_SMTP_OPEN().
"" = Default, "SSL" = selects for secure email transport.
Default = 5000. The number of milliseconds the function will wait to establish the connection before timing out.
The host name of the SMTP server.
Default = 25. The TCP port used for the connection.
The user's logon.
The user's password.
Specify "SSL" to enable SSL on this connection. Specify "TLS" to enable TLS on this connection.
.T. = Login was successful. .F. = Login was not successful.
The EMAIL_SMTP_OPEN() function opens a connection with a SMTP server. This function, along with EMAIL_SMTP_SEND() and EMAIL_SMTP_CLOSE(), will allow you to send email from a computer that does not have an Alpha Anywhere email profile.
dim pm as P dim ps as P if (email_smtp_open(ps, "mail.alphasoftware.com", 25, "username", "password")) then pm.to = "[email protected]" pm.from = "[email protected]" pm.subject = "my subject" pm.message = "this is the message" pm.attachments =<<%str% C:\test.zip C:\dev\test2.zip %str% pm.html_message = "This is the message in HTML" if (email_smtp_send(pm, ps) <> .f.) then dim msg as C = "Email sent" TRACE.writeLn(msg,"Email Log") else dim msg as C = "Could not send email" TRACE.writeLn(msg,"Email Log") end if else dim msg as C = "Could not connect to SMTP server" TRACE.writeLn(msg,"Email Log") end if email_smtp_close(ps)