Description
Socket function used to send mail from an OpenInsight workstation.
Syntax
retval = SENDMAIL(mailservername, sendername, recipient, subject, body, cc, bcc, replyto, content, attachmentfilelist, username, password)
Parameters
Parameters | Description |
---|---|
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 is text that is sent if the file to send is not able to be sent. |
cc | Additional recipients of the mail message. Multiple email addresses can be delimited by either semicolons (;) or value marks (@vm). |
bcc | Additional 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). |
replyto | The email address of the party that will receive any replies from the mail message. |
content | The 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). |
attachmentfilelist | An @vm-delimited list of files to be attached to the email. The list should contain both paths and filenames. |
username | The username of the mail account. |
password | The password of the mail account. |
See also
Socket Functions
Example
Declare Function SENDMAIL, Msg mailservername = "my.mailserver.net" Sendername = "info@revelation.com" Recipient = "someone@somewhere.com" Subject = "An Example of the OpenInsight SENDMAIL Function" Body = ."A line of text." CC = "" BCC = "" replyto = "" content = "" attachmentfilelist = 'C:\TEMP\myfile.txt' :@vm: 'C:\MY_DIR\ano_file.txt' username = "" password = "" retval = sendmail(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)