Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SmtpMessage.cs
1using System;
2using System.Collections.Generic;
3using System.Net.Mail;
4using System.Text;
6
8{
12 public class SmtpMessage
13 {
14 private Priority priority = Priority.Normal;
15 private DateTimeOffset? date = null;
16 private string contentId = null;
17 private string contentLocation = null;
18 private string contentTransferEncoding = null;
19 private string contentType = null;
20 private string subject = null;
21 private string messageId = null;
22 private string clientName = null;
23 private string remoteEndpoint = null;
24 private double? mimeVersion = null;
25 private Encoding contentTypeEncoding = null;
26 private MailAddress fromMail = null;
27 private MailAddress fromHeader = null;
28 private MailAddress sender = null;
29 private MailAddress[] recipients = null;
30 private KeyValuePair<string, string>[] allHeaders = null;
31 private KeyValuePair<string, string>[] unparsedHeaders = null;
32 private byte[] untransformedBody = null;
33 private byte[] transformedBody = null;
34 private object decodedBody = null;
35 private MailAddress[] to = null;
36 private MailAddress[] cc = null;
37 private MailAddress[] bcc = null;
38 private MailAddress[] replyTo = null;
39 private EmbeddedContent[] inlineObjects = null;
40 private EmbeddedContent[] attachments = null;
41
45 public double? MimeVersion
46 {
47 get => this.mimeVersion;
48 set => this.mimeVersion = value;
49 }
50
54 public Priority Priority
55 {
56 get => this.priority;
57 set => this.priority = value;
58 }
59
63 public DateTimeOffset? Date
64 {
65 get => this.date;
66 set => this.date = value;
67 }
68
72 public string ContentId
73 {
74 get => this.contentId;
75 set => this.contentId = value;
76 }
77
81 public string ContentLocation
82 {
83 get => this.contentLocation;
84 set => this.contentLocation = value;
85 }
86
93 {
94 get => this.contentTransferEncoding;
95 set => this.contentTransferEncoding = value;
96 }
97
103 public string ContentType
104 {
105 get => this.contentType;
106 set => this.contentType = value;
107 }
108
112 public string Subject
113 {
114 get => this.subject;
115 set => this.subject = value;
116 }
117
121 public MailAddress FromMail
122 {
123 get => this.fromMail;
124 set => this.fromMail = value;
125 }
126
130 public MailAddress FromHeader
131 {
132 get => this.fromHeader;
133 set => this.fromHeader = value;
134 }
135
139 public MailAddress Sender
140 {
141 get => this.sender;
142 set => this.sender = value;
143 }
144
148 public MailAddress[] Recipients
149 {
150 get => this.recipients;
151 set => this.recipients = value;
152 }
153
157 public KeyValuePair<string, string>[] AllHeaders
158 {
159 get => this.allHeaders;
160 set => this.allHeaders = value;
161 }
162
166 public KeyValuePair<string, string>[] UnparsedHeaders
167 {
168 get => this.unparsedHeaders;
169 set => this.unparsedHeaders = value;
170 }
171
175 public byte[] UntransformedBody
176 {
177 get => this.untransformedBody;
178 set => this.untransformedBody = value;
179 }
180
186 public byte[] TransformedBody
187 {
188 get => this.transformedBody;
189 set => this.transformedBody = value;
190 }
191
197 public object DecodedBody
198 {
199 get => this.decodedBody;
200 set => this.decodedBody = value;
201 }
202
206 public MailAddress[] To
207 {
208 get => this.to;
209 set => this.to = value;
210 }
211
215 public MailAddress[] Cc
216 {
217 get => this.cc;
218 set => this.cc = value;
219 }
220
224 public MailAddress[] Bcc
225 {
226 get => this.bcc;
227 set => this.bcc = value;
228 }
229
233 public MailAddress[] ReplyTo
234 {
235 get => this.replyTo;
236 set => this.replyTo = value;
237 }
238
242 public string MessageID
243 {
244 get => this.messageId;
245 set => this.messageId = value;
246 }
247
251 public Encoding ContentTypeEncoding
252 {
253 get => this.contentTypeEncoding;
254 set => this.contentTypeEncoding = value;
255 }
256
261 {
262 get => this.inlineObjects;
263 set => this.inlineObjects = value;
264 }
265
270 {
271 get => this.attachments;
272 set => this.attachments = value;
273 }
274
278 public string ClientName
279 {
280 get => this.clientName;
281 set => this.clientName = value;
282 }
283
287 public string RemoteEndpoint
288 {
289 get => this.remoteEndpoint;
290 set => this.remoteEndpoint = value;
291 }
292
293 }
294}
Represents content embedded in other content.
Represents one message received over SMTP
Definition: SmtpMessage.cs:13
object DecodedBody
Decoded body. ContentType defines how TransformedBody is transformed into DecodedBody.
Definition: SmtpMessage.cs:198
byte[] TransformedBody
Transformed body. ContentTransferEncoding defines how UntransformedBody is transformed into Transform...
Definition: SmtpMessage.cs:187
string ContentId
Content ID of message, if defined
Definition: SmtpMessage.cs:73
MailAddress[] To
Recipients, if defined by To mail headers.
Definition: SmtpMessage.cs:207
DateTimeOffset? Date
Date of message, if defined
Definition: SmtpMessage.cs:64
MailAddress[] Cc
Recipients, if defined by Cc mail headers.
Definition: SmtpMessage.cs:216
MailAddress FromMail
From address, as specified by the client to initiate mail transfer.
Definition: SmtpMessage.cs:122
MailAddress FromHeader
From address, as specified in the mail headers.
Definition: SmtpMessage.cs:131
MailAddress[] Recipients
Recipients of message, as defined during initiation of transfer.
Definition: SmtpMessage.cs:149
MailAddress[] ReplyTo
Return addresses, if defined by Reply-To mail headers.
Definition: SmtpMessage.cs:234
string ContentTransferEncoding
Content Transfer Encoding of message, if defined. Affects how UntransformedBody is transformed into T...
Definition: SmtpMessage.cs:93
EmbeddedContent[] Attachments
Any attachments, if specified.
Definition: SmtpMessage.cs:270
MailAddress[] Bcc
Recipients, if defined by Bcc mail headers.
Definition: SmtpMessage.cs:225
KeyValuePair< string, string >[] AllHeaders
All mail headers provided by client.
Definition: SmtpMessage.cs:158
string ContentType
Content Type of message, if defined. Affects how TransformedBody is transformed into DecodedBody.
Definition: SmtpMessage.cs:104
double? MimeVersion
MIME Version, if defined
Definition: SmtpMessage.cs:46
string ClientName
Client name, as provided by the HELO or EHLO commands.
Definition: SmtpMessage.cs:279
string Subject
Subject of message, if defined
Definition: SmtpMessage.cs:113
KeyValuePair< string, string >[] UnparsedHeaders
Headers in AllHeaders that have not been parsed.
Definition: SmtpMessage.cs:167
string RemoteEndpoint
Remote endpoint of client.
Definition: SmtpMessage.cs:288
EmbeddedContent[] InlineObjects
Any inline objects, if specified.
Definition: SmtpMessage.cs:261
MailAddress Sender
Sender, as specified in the mail headers.
Definition: SmtpMessage.cs:140
Encoding ContentTypeEncoding
Content-Type encoding, if specified in the Content-Type header field.
Definition: SmtpMessage.cs:252
string ContentLocation
Content Location of message, if defined
Definition: SmtpMessage.cs:82
byte[] UntransformedBody
Raw, untrasnformed body of message.
Definition: SmtpMessage.cs:176