Esempio n. 1
0
 /// <summary>
 /// Creates a new file attachment information
 /// </summary>
 /// <param name="content">Content for the attachment</param>
 /// <param name="displayName">Name and extension as the reader of the mail should see it (in case of inline attachments displayName is used for CIDs</param>
 public StringAttachment(string content, string displayName)
 {
     Content     = content;
     DisplayName = displayName;
     MimeType    = Mime.GetContentType(new FileInfo(displayName));
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a new file attachment information
 /// </summary>
 /// <param name="fileName">Full path of the file </param>
 /// <param name="displayName">Name and extension as the reader of the mail should see it (in case of inline attachments displayName is used for CIDs</param>
 public FileAttachment(string fileName, string displayName)
 {
     Filename    = fileName;
     DisplayName = displayName;
     MimeType    = Mime.GetContentType(new FileInfo(fileName));
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new file attachment information
 /// </summary>
 /// <param name="content">Content for the attachment</param>
 /// <param name="displayName">Name and extension as the reader of the mail should see it (in case of inline attachments displayName is used for CIDs</param>
 /// <param name="mimeType">Mime type of the file</param>
 public StringAttachment(string content, string displayName, string mimeType)
 {
     Content     = content;
     DisplayName = displayName;
     MimeType    = string.IsNullOrEmpty(mimeType) ? Mime.GetContentType(new FileInfo(displayName)) : mimeType;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new file attachment information
 /// </summary>
 /// <param name="fileName">Full path of the file</param>
 /// <param name="displayName">Name and extension as the reader of the mail should see it (in case of inline attachments displayName is used for CIDs</param>
 /// <param name="mimeType">Mime type of the file</param>
 public FileAttachment(string fileName, string displayName, string mimeType)
 {
     Filename    = fileName;
     DisplayName = displayName;
     MimeType    = string.IsNullOrEmpty(mimeType) ? Mime.GetContentType(new FileInfo(fileName)) : mimeType;
 }