예제 #1
0
        protected override void ProcessRecord()
        {
            AddressObject sender = null;

            if (!string.IsNullOrWhiteSpace(this.SenderEmail))
            {
                sender = new AddressObject(this.SenderEmail, this.SenderDisplayName);
            }

            var email = new EmailObject(sender, this.Subject, this.Draft)
            {
                BodyText   = this.BodyText,
                BodyHtml   = this.BodyHtml,
                Importance = this.Importance
                             //IconIndex = MessageIconIndex.UnsentMail;
            };

            WriteObject(email);

            base.ProcessRecord();
        }
예제 #2
0
 public EmailObject(AddressObject sender, string subject, bool draft)
 {
     this.Sender  = sender;
     this.Subject = subject;
     this.Draft   = draft;
 }