-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9845284
commit da95ecd
Showing
15 changed files
with
452 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
200 changes: 0 additions & 200 deletions
200
Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Definitions.cs
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Definitions/Attachment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.ComponentModel; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Frends.SMTP.SendEmail.Definitions | ||
{ | ||
/// <summary> | ||
/// Attachment | ||
/// </summary> | ||
public class Attachment | ||
{ | ||
/// <summary> | ||
/// Chooses if the attachment file is created from a string or copied from disk. | ||
/// </summary> | ||
public AttachmentType AttachmentType { get; set; } | ||
|
||
/// <summary> | ||
/// Attachment from string. | ||
/// </summary> | ||
[UIHint(nameof(AttachmentType), "", AttachmentType.AttachmentFromString)] | ||
public AttachmentFromString stringAttachment { get; set; } | ||
|
||
/// <summary> | ||
/// Attachment file's path. Uses Directory.GetFiles(string, string) as a pattern matching technique. See https://msdn.microsoft.com/en-us/library/wz42302f(v=vs.110).aspx. | ||
/// Exception: If the path ends in a directory, all files in that folder are added as attachments. | ||
/// </summary> | ||
[DefaultValue("\"\"")] | ||
[UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)] | ||
public string FilePath { get; set; } | ||
|
||
/// <summary> | ||
/// If set true and no files match the given path, an exception is thrown. | ||
/// </summary> | ||
[UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)] | ||
public bool ThrowExceptionIfAttachmentNotFound { get; set; } | ||
|
||
/// <summary> | ||
/// If set true and no files match the given path, email will be sent nevertheless. | ||
/// </summary> | ||
[UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)] | ||
public bool SendIfNoAttachmentsFound { get; set; } | ||
} | ||
} |
Oops, something went wrong.