private MailMessage CreateMailMessage() { MailMessage message = new MailMessage(); message.From = new MailAddress(this.from); message.Subject = this.subject; message.Body = this.body; message.IsBodyHtml = this.html; if (!this.ehloOptions.XSysProbe || this.useXheader) { base.WriteVerbose(new LocalizedString(string.Format(CultureInfo.CurrentCulture, "Sending system probe guid in {0} header", new object[] { "X-FFOSystemProbe" }))); string value = SystemProbeId.EncryptProbeGuid(this.probeGuid, DateTime.UtcNow); message.Headers.Add("X-FFOSystemProbe", value); } this.to.ForEach(delegate(string s) { message.To.Add(s); }); this.cc.ForEach(delegate(string s) { message.CC.Add(s); }); this.attachments.ForEach(delegate(string s) { message.Attachments.Add(this.CreateAttachment(s)); }); return(message); }
protected override void InternalProcessRecord() { if (this.guid == null) { this.guid = new Guid?(System.Guid.NewGuid()); } if (this.time == null) { this.time = new DateTime?(DateTime.UtcNow); } string cypherText = SystemProbeId.EncryptProbeGuid(this.guid.Value, this.time.Value); base.WriteObject(this.CreateSystemProbeData(this.guid.Value, this.time.Value, cypherText)); }