Description

This function will send emails from OpenInsight using authenticated logins and/or a Secure Sockets Layer (SSL).

Syntax

RTI_CDOMail(mailservername,sendername, recipient, subject, body,cc, bcc, replyto, content, attachmentfilelist, Username, Password, useSSL)

Parameters

The function has the following parameters:

ParameterDescription
mailservernameThe IP address of the mailserver.
sendernameThe email address of the sender of the email.
recipientThe email address of the receiver of the email.
subjectThe subject of the mail message.
bodyThe body of the mail message. This is text that is sent if the file to send is not able to be sent.
ccAdditional recipients of the mail message. Multiple email addresses can be delimited by either semicolons (;) or value marks (@vm).
bccAdditional recipients of the mail message. These recipients are unknown to all other recipients. Multiple email addresses can be delimited by either semicolons (;) or value marks (@vm).
replytoThe email address of the party that will receive any replies from the mail message.
contentThe override parameter of the default header types.
 e.g.
 'Content-Type: text/plain' (plain email minus attachments)
 'Content-Type: multipart/mixed; boundary="_-_-_-_"' (for when you want email plus attachments)
 Setting the content parameter will interfere with all the header settings, and may cause problems with attachments (unless you take full control and build these into the email yourself).
attachmentfilelistAn @vm-delimited list of files to be attached to the email. The list should contain both paths and filenames.
usernameThe username of the mail account.
passwordThe password of the mail account.
useSSLA boolean flag. When TRUE$ SSL will be used when mailing.

Returns

OpenInsight will return the error message received from CDO. These error message generally relate to configuration issues with CDO. The errors are version specific, therefore it is recommended that Microsoft's documentation be referenced.

Remarks

This function was built using the CDO.Net objects. Refer to your operating system configuration for errors regarding CDO.

See also

CreateEngine()

Example

mailservername = 'my.mailserver.com'
mailserverPort='999';* use the proper port
mailServer = mailServerName:':':mailserverPort
username = 'my_username'
password = 'my_password'
useSSl = 1
body = 'This is a test of CDO Mail''
retval = rti_cdoMail( mailserver, sendername, recipient, subject, body, cc, bcc, replyto, content, attachmentfilelist, username, password, useSSl )