![]() |
|
||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||||
|
|
||||||
| Other Library Functions | ||||||
| function |
MailOutBoxCreate |
|
Library: Net, Email support, SMTP and POP3 (OMMAIL)
Include: ommail.xin |
Return type: MailOutBox Returns: A MailOutBox OMX component. |
define external MailOutBox function MailOutBoxCreate
name value stream sender-name
address value stream address
server value stream server optional initial {mail}
user value stream user optional
password value stream password optional
This function creates and returns a MailOutBox object with the given configuration information. The MailOutBox is an OMX component used by the outgoing mail functions in the mail library.
Arguments:
If the SMTP server requires users to authenticate themselves before sending mail, you must specify the user and password. You must specify name and password together. It is an error to specify one without the other.
There are multiple protocols used to implement authentication on an SMTP server. The OMMAIL library will select the appropriate protocol automatically, however, OMMAIL does not support all protocols. OMMAIL supports the LOGIN and PLAIN authentication protocols, but does not support SSL encryption.
Examples:
; create a mailbox using the default server, "mail"
process
local MailOutBox this-MailOutBox
set this-MailOutBox to
MailOutBoxCreate name "George" address "[email protected]"
; create a mailbox using a server other than "mail" on a server that require authentication
process
local MailOutBox this-MailOutBox
set this-MailOutBox to
MailOutBoxCreate name "Jim" address "[email protected]" server "specialMail" user "Jim" password "x9hdt45j"