|
Sybernet / Supplied Procedures Reference
Release 3.00 Mar 03, 2005 |
|
This procedure provides a convenient interface for sending a simple e-mail message from your stored procedure or PL/SQL block. The mail is sent asychronously using Sybercron and does not affect the flow or execution time of your routine.
Procedure SP_SENDMAIL
(
@SUBJECT VARCHAR(255)
, @TO VARCHAR(255)
, @FROM VARCHAR(255)
, @PRIORITY VARCHAR(255)
, @MESSAGE VARCHAR(255)
, @MESSAGE2 VARCHAR(255)
, @MESSAGE3 VARCHAR(255)
, @CONTENTTYPE VARCHAR(30)
, @CONTEXTTYPE VARCHAR(4)
, @TIMESTAMP DATETIME
, @COMPOSING VARCHAR(5)
, @PLATFORM VARCHAR(30)
) ;
| Parameter | Description |
|---|---|
subject |
The subject or title of this message. |
to |
The e-mail address of the recepient. |
from |
Your e-mail address. |
priority |
This parameter can be one of
The default is 3 (normal) |
message |
This contains the body of your e-mail. Since this message is written to the CRON table, the largest possible message is 4,000 characters. If you need to send a larger message than this, you will have to write your own routine. |
contenttype |
This parameter should be one of
The default is text/plain. |
timestamp |
Specifies when this mail is to be sent. If you want the mail to be sent immediately, omit completely or specify NULL. |
composing |
For Internal Use Only. |
platform |
The platform (or identity value) where Sybercron is running. This can be left unspecified because the default platform should be able to send this mail. |
The following example illustrates how to call sp_sendmail:
exec sp_sendmail
@SUBJECT = 'Test Message'
, @TO = 'nospam@nospams.com'
, @FROM = 'nospam@nospams.com'
, @MESSAGE = 'Hello World'
, @CONTENTTYPE = 'text/plain'