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.

Methods

The IEmailAction interface has these methods.

Method Description
IEmailAction::get_Attachments Gets or sets the pointer to an array of attachments that is sent with the email message.
IEmailAction::get_Bcc Gets or sets the email address or addresses that you want to Bcc in the email message.
IEmailAction::get_Body Gets or sets the body of the email that contains the email message.
IEmailAction::get_Cc Gets or sets the email address or addresses that you want to Cc in the email message.
IEmailAction::get_From Gets or sets the email address that you want to send the email from.
IEmailAction::get_HeaderFields Gets or sets the header information in the email message to send.
IEmailAction::get_ReplyTo Gets or sets the email address that you want to reply to.
IEmailAction::get_Server Gets or sets the name of the SMTP server that you use to send email from.
IEmailAction::get_Subject Gets or sets the subject of the email message.
IEmailAction::get_To Gets or sets the email address or addresses that you want to send the email to.
IEmailAction::put_Attachments Gets or sets the pointer to an array of attachments that is sent with the email message.
IEmailAction::put_Bcc Gets or sets the email address or addresses that you want to Bcc in the email message.
IEmailAction::put_Body Gets or sets the body of the email that contains the email message.
IEmailAction::put_Cc Gets or sets the email address or addresses that you want to Cc in the email message.
IEmailAction::put_From Gets or sets the email address that you want to send the email from.
IEmailAction::put_HeaderFields Gets or sets the header information in the email message to send.
IEmailAction::put_ReplyTo Gets or sets the email address that you want to reply to.
IEmailAction::put_Server Gets or sets the name of the SMTP server that you use to send email from.
IEmailAction::put_Subject Gets or sets the subject of the email message.
IEmailAction::put_To Gets or sets the email address or addresses that you want to send the email to.

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]
Target Platform Windows
Header taskschd.h

See Also

IAction

IActionCollection

Task Scheduler