Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning
iconfalse

This function has been deprecated as of OI 9.4. Use RTI_SendMail instead

Description

Socket function used to send SMTP mail from an OpenInsight workstation.  Allows for the use of Multi-part MIME when sending email.

Syntax

retval   =  SENDMAIL( SMTPMAIL(html_filename, mailservername, sendername, recipient, subject, body, cc, bcc, replyto, content, attachmentfilelist, username, password)

Parameters

The password of the mail account
ParametersDescription

html_filename

The name of the file to send.

mailservername

The IP address of the mailserver.

sendername

The email address of the sender of the email.

recipient

The email address of the receiver of the email.

subject

The subject of the mail message.

body

The body of the mail message.

This

 This is text that is sent if the file to send is not able to be sent.

cc

Additional recipients of the mail message.

Multiple

 Multiple email addresses can be delimited by either semicolons (;) or value marks (@vm).

bcc

Additional recipients of the mail message.

These

 These recipients are unknown to all other recipients. Multiple email addresses can be delimited by either semicolons (;) or value marks (@vm).

replyto

username

The

email address

username of the

party that will receive any replies from the mail message

SMTP account.

content

password

The

override parameter

password of the

default header types

SMTP account.

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.
password

Remark

This function sends a Multipart Mime email (stored in HTML form) via a SMTP server.

See also

Socket Functions

Example

Code Block
Declare Function SENDMAILSMTPMAIL, Msg

html_document = "\html\my_html_file.htm"
mailservername = "my.mailserver.net"
Sendername = "info@revelation.com"
Recipient Recipient  = "someone@somewhere.com"
Subject = "An Example of the OpenInsight SENDMAILSMTPMAIL Function"
Body = ."A line of text."
CCUsername = ""
BCCPassword = ""
replyto = ""
content = ""
attachmentfilelist = 'C:\TEMP\myfile.txt' :@vm: 'C:\MY_DIR\ano_file.txt'
username = ""
password = ""
 
retval = sendmail(
retval = smtpmail(html_document, mailservername, sendername, recipient, subject, body, cc, bcc, replyto, content,attachmentfilelist, username, password)
Convert @vm To '-' In retval
Convert @fm To '|' In retval
x = Msg(@Window, 'Retval was |':retval)

...