![]() | Email |
![]() |
---|
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. |
![]() |
---|
This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the PowerShellConversion property is set to All. To disable this conversion, set the value to Never. |
[XmlTypeAttribute(IncludeInSchema = true)] [XmlRootAttribute("SendEmail", Namespace = "http://schemas.microsoft.com/windows/2004/02/mit/task", IsNullable = false)] public sealed class EmailAction : Action
The EmailAction type exposes the following members.
Name | Description | |
---|---|---|
![]() | EmailAction | Creates an unbound instance of EmailAction. |
![]() | EmailAction(String, String, String, String, String) | Creates an unbound instance of EmailAction. |
Name | Description | |
---|---|---|
![]() | ActionType | Gets the type of the action. (Inherited from Action) |
![]() | Attachments | Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a String value containing a path to file. |
![]() | Bcc | Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. |
![]() | Body | Gets or sets the body of the e-mail that contains the e-mail message. |
![]() | Cc | Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. |
![]() | From | Gets or sets the e-mail address that you want to send the e-mail from. |
![]() | HeaderFields | Gets or sets the header information in the e-mail message to send. |
![]() | Id | Gets or sets the identifier of the action. (Inherited from Action) |
![]() | Priority | Gets or sets the priority of the e-mail message. |
![]() | ReplyTo | Gets or sets the e-mail address that you want to reply to. |
![]() | Server | Gets or sets the name of the server that you use to send e-mail from. |
![]() | Subject | Gets or sets the subject of the e-mail. |
![]() | To | Gets or sets the e-mail address or addresses that you want to send the e-mail to. |
Name | Description | |
---|---|---|
![]() | Clone | Creates a new object that is a copy of the current instance. (Inherited from Action) |
![]() | CompareTo |
Compares the current instance with another object of the same type and returns an integer that indicates whether the current
instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Inherited from Action) |
![]() | Dispose | Releases all resources used by this class. (Inherited from Action) |
![]() | Equals(Action) | Indicates whether the current object is equal to another object of the same type. (Overrides ActionEquals(Action)) |
![]() | Equals(Object) | Determines whether the specified Object, is equal to this instance. (Inherited from Action) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
![]() | GetHashCode | Returns a hash code for this instance. (Inherited from Action) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
![]() | ToString | Gets a string representation of the EmailAction. (Overrides ActionToString) |
![]() | ToString(CultureInfo) | Returns a String that represents this action. (Inherited from Action) |
Name | Description | |
---|---|---|
![]() | PropertyChanged | Occurs when a property value changes. (Inherited from Action) |
Name | Description | |
---|---|---|
![]() | unboundValues | List of unbound values when working with Actions not associated with a registered task. (Inherited from Action) |
EmailAction ea = new EmailAction("Task fired", "sender@email.com", "recipient@email.com", "You just got a message", "smtp.company.com"); ea.Bcc = "alternate@email.com"; ea.HeaderFields.Add("reply-to", "dh@mail.com"); ea.Priority = System.Net.Mail.MailPriority.High; // All attachement paths are checked to ensure there is an existing file ea.Attachments = new object[] { "localpath\\ondiskfile.txt" };