IEmailAction interface (taskschd.h)
[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.
Inheritance
The IEmailAction interface inherits from the IAction interface.
Methods
The IEmailAction interface has these methods.
IEmailAction::get_Attachments Gets or sets the pointer to an array of attachments that is sent with the email message. (Get) |
IEmailAction::get_Bcc Gets or sets the email address or addresses that you want to Bcc in the email message. (Get) |
IEmailAction::get_Body Gets or sets the body of the email that contains the email message. (Get) |
IEmailAction::get_Cc Gets or sets the email address or addresses that you want to Cc in the email message. (Get) |
IEmailAction::get_From Gets or sets the email address that you want to send the email from. (Get) |
IEmailAction::get_HeaderFields Gets or sets the header information in the email message to send. (Get) |
IEmailAction::get_ReplyTo Gets or sets the email address that you want to reply to. (Get) |
IEmailAction::get_Server Gets or sets the name of the SMTP server that you use to send email from. (Get) |
IEmailAction::get_Subject Gets or sets the subject of the email message. (Get) |
IEmailAction::get_To Gets or sets the email address or addresses that you want to send the email to. (Get) |
IEmailAction::put_Attachments Gets or sets the pointer to an array of attachments that is sent with the email message. (Put) |
IEmailAction::put_Bcc Gets or sets the email address or addresses that you want to Bcc in the email message. (Put) |
IEmailAction::put_Body Gets or sets the body of the email that contains the email message. (Put) |
IEmailAction::put_Cc Gets or sets the email address or addresses that you want to Cc in the email message. (Put) |
IEmailAction::put_From Gets or sets the email address that you want to send the email from. (Put) |
IEmailAction::put_HeaderFields Gets or sets the header information in the email message to send. (Put) |
IEmailAction::put_ReplyTo Gets or sets the email address that you want to reply to. (Put) |
IEmailAction::put_Server Gets or sets the name of the SMTP server that you use to send email from. (Put) |
IEmailAction::put_Subject Gets or sets the subject of the email message. (Put) |
IEmailAction::put_To Gets or sets the email address or addresses that you want to send the email to. (Put) |
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | taskschd.h |