www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
mime_body
mime_part
mime_tree
nntp_auth_get
nntp_auth_post
nntp_get
nntp_post
pem_certificates_to_...
pop3_get
smime_sign
smime_verify
smtp_send
uuvalidate
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY

Functions Index

smtp_send

send message to SMTP server
smtp_send (in server string, in sender string, in recipient string, in body string);
Description

Virtuoso can act as an SMTP client. This means that Virtuoso is able to send emails directly to a mail SMTP server. Virtuoso has a simple function to facilitate this. This can be called from stored procedures, VSP pages, triggers etc.

The sender and recipient email addresses must be enclosed with <..> and separated by commas i.e. string '<support@openlinksw.co.uk>,<sales@openlinksw.co.uk>'

The message Body contains headers such as Subject, From, To, Cc, Bcc and then continues with the actual message text itself. New lines can be added using '\r\n'

Example:
'Subject: subject message\r\nFrom: sender\r\nTo: recipient\r\nCc:
copy\r\nBcc: copy\r\n body of message'

Virtuoso will pick up Subject and other headers from the body content.