IEmailAction

IEmailAction interface

[This interface is no longer supported. Please use IExecAction with the powershell Send-MailMessage cmdlet as a workaround.]

Represents an action that sends an email message.

Members

The IEmailAction interface inherits from IAction. IEmailAction also has these types of members:

Properties

The IEmailAction interface has these properties.

PropertyAccess typeDescription

Attachments

Read/write

Gets or sets the pointer to an array of attachments that was sent with the email message.

Bcc

Read/write

Gets or sets the email address or addresses that you want to Bcc in the email message.

Body

Read/write

Gets or sets the body of the email that contains the email message.

Cc

Read/write

Gets or sets the email address or addresses that you want to Cc in the email message.

From

Read/write

Gets or sets the email address that you want to send the email from.

HeaderFields

Read/write

Gets or sets the header information in the email that you want to send.

Id

Read/write

Inherited from the IAction interface. Gets or sets the identifier of the action.

ReplyTo

Read/write

Gets or sets the email address that you want to reply to.

Server

Read/write

Gets or sets the name of the server that you use to send email from.

Subject

Read/write

Gets or sets the subject of the email message.

To

Read/write

Gets or sets the email address or addresses that you want to send the email to.

Type

Read-only

Inherited from the IAction interface. Gets the type of the action.

 

Remarks

The email action must have a valid value for the Server, From, and To or Cc properties for the task to register and run correctly.

When reading or writing your own XML for a task, an email action is specified using the SendEmail element of the Task Scheduler schema.

Windows 8 and Windows Server 2012:  This interface has been removed. Please use IExecAction with the powershell Send-MailMessage cmdlet as a workaround.

Examples

For more information and example code for this interface, see Event Trigger Example (C++).

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008 R2

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

IActionCollection
IAction
Task Scheduler

 

 

Community Additions

ADD
Show:
© 2016 Microsoft