JDBC Driver for Gmail

Build 21.0.8137

SendMailMessage

Sends the message specified to the specified recipient.

ストアドプロシージャ固有の情報

このプロシージャを使用してE メールを送信します。

ファイルを1つだけ添付する例です。

EXECUTE SendMailMessage @Subject='subject', @To='email', @CC='email', @Content='content', @AttachmentPath='C:\\MyDirectory\\MyFile.extension'

ディレクトリの最初の階層の、すべてのファイルを添付する例です。

EXECUTE SendMailMessage @Subject='subject', @To='email', @CC='email', @Content='content', @AttachmentPath='C:\\MyDirectory'

複数のファイルとフォルダを、組み合わせて添付する例です。

Insert into attach#temp (AttachmentPath) VALUES ('C:\\MyDirectory\\MyFile.extension')
Insert into attach#temp (AttachmentPath) VALUES ('C:\\MyDirectory')
EXECUTE SendMailMessage @Subject='subject', @To='email', @CC='email', @Content='content', @AttachmentPath='attach#temp'

Note: This procedure makes use of indexed parameters. These input parameters are denoted with a '#' character at the end of their names.

Indexed parameters facilitate providing multiple instances a single parameter as inputs for the procedure.

Suppose there is an input parameter named Param#. Input multiple instances of an indexed parameter like this:

EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"

Input

Name Type Required Description
To String True The email address of the recipient.
From String False The email addresses of the sender.
Subject String True The subject of the mail message.
Content String True The message body.
CC String False CCed recipient.
BCC String False BCCed recipient.
AttachmentPath String False A semicolon-separated list of the attachment file names (with the path if reading from a file) included in the message.

Result Set Columns

Name Type Description
Id String The Id for the message as returned by the server.

Copyright (c) 2022 CData Software, Inc. - All rights reserved.
Build 21.0.8137