SoftadminApi.Mail_Enqueue

 Show all Hide all

Inserts an email into the system's internal mail queue.

The procedure accepts a few optional temporary tables:

CREATE TABLE #To
(
  [Address] varchar(max) NOT NULL
)

CREATE TABLE #Bcc
(
  [Address] varchar(max) NOT NULL
)

CREATE TABLE #Attachment
(
  [Filename] varchar(300) NOT NULL,
  [File] varbinary(max) NOT NULL,
  [ContentId] varchar(300) NULL
)
Type: Stored procedure
Area of use: API

Parameters:

@Css optional varchar
For a HTML mail, extra style declarations that should be included in the mail. You must wrap the CSS in a <style>-tag.
@EmailIdOut optional bigint
ID of the queued email. You can use it to lookup the message in the SoftadminApi.MailQueue view.
@FromAddress mandatory varchar
The from address.
@FromName optional varchar
Human-readable version of the sender's name.
@HtmlBody optional varchar
The body of a HTML mail. You must specify at least one of @HtmlBody and @PlaintextBody.
@PlaintextBody optional varchar
The body of a plaintext mail. You must specify at least one of @HtmlBody and @PlaintextBody.
@ReplyAddress optional varchar
Alternate reply-address.
@Subject mandatory varchar
Email subject line.
@ToAddress optional varchar
Receiver, if you do not use the #To table. If the #To table is present then the union of this parameter and the table are used.