From a8da381f575c1e0327c23f6883b6a0da8c6d5a70 Mon Sep 17 00:00:00 2001 From: jefim Date: Fri, 3 Nov 2023 13:09:36 +0200 Subject: [PATCH] Fix XML docs --- .../Frends.Smtp.SendEmail/Definitions.cs | 33 ++++++++++++++++--- .../Frends.Smtp.SendEmail.csproj | 6 ++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Definitions.cs b/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Definitions.cs index c558e16..5ac23e0 100644 --- a/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Definitions.cs +++ b/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Definitions.cs @@ -8,54 +8,63 @@ public class Input /// /// Recipient addresses separated by ',' or ';' /// - [DefaultValue("\"jane.doe@somedomain.com\"")] + /// jane.doe@example.org + [DefaultValue("\"jane.doe@example.org\"")] public string To { get; set; } /// /// Cc recipient addresses separated by ',' or ';' /// - [DefaultValue("\"jane.doe@somedomain.com\"")] + /// jane.doe@example.org + [DefaultValue("\"jane.doe@example.org\"")] public string Cc { get; set; } /// /// Bcc recipient addresses separated by ',' or ';' /// - [DefaultValue("\"jane.doe@somedomain.com\"")] + /// jane.doe@example.org + [DefaultValue("\"jane.doe@example.org\"")] public string Bcc { get; set; } /// /// Sender address. /// - [DefaultValue("\"john.doe@somedomain.com\"")] + /// john.doe@example.org + [DefaultValue("\"john.doe@example.org\"")] public string From { get; set; } /// /// Name of the sender. /// + /// Frends [DefaultValue("\"\"")] public string SenderName { get; set; } /// /// Email message's subject. /// + /// Hello Jane [DefaultValue("\"Hello Jane\"")] public string Subject { get; set; } /// /// Body of the message. /// + /// You've got mail! [DefaultValue("\"You've got mail!\"")] public string Message { get; set; } /// /// Set this true if the message is HTML. /// + /// true [DefaultValue("false")] public bool IsMessageHtml { get; set; } /// /// Encoding of message body and subject. Use following table's name column for other options. https://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx#Anchor_5 /// + /// utf-8 [DefaultValue("\"utf-8\"")] public string MessageEncoding { get; set; } @@ -66,30 +75,35 @@ public class Options /// /// SMTP server address. /// + /// smtp.somedomain.com [DefaultValue("\"smtp.somedomain.com\"")] public string SMTPServer { get; set; } /// /// SMTP server port. /// + /// 25 [DefaultValue("25")] public int Port { get; set; } /// /// Set this true if SMTP expects to be connected using SSL. /// + /// true [DefaultValue("false")] public bool UseSsl { get; set; } /// /// Set this true if you want to use windows authentication to authenticate to SMTP server. /// + /// true [DefaultValue("true")] public bool UseWindowsAuthentication { get; set; } /// /// Use this username to log in to the SMTP server /// + /// username [DefaultValue("\"\"")] [UIHint(nameof(UseWindowsAuthentication), "", false)] public string UserName { get; set; } @@ -97,6 +111,7 @@ public class Options /// /// Use this password to log in to the SMTP server /// + /// Password123 [PasswordPropertyText(true)] [DefaultValue("\"\"")] [UIHint(nameof(UseWindowsAuthentication), "", false)] @@ -108,10 +123,12 @@ public class Output /// /// Value is true if email was sent. /// + /// true public bool EmailSent { get; set; } /// /// Contains information about the task's result. /// + /// No attachments found matching path \"C:\\temp\\*.csv\". No email sent. public string StatusString { get; set; } } @@ -120,6 +137,7 @@ public class Attachment /// /// Chooses if the attachment file is created from a string or copied from disk. /// + /// FileAttachment public AttachmentType AttachmentType { get; set; } [UIHint(nameof(AttachmentType), "", AttachmentType.AttachmentFromString)] @@ -129,6 +147,7 @@ public class Attachment /// 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. /// + /// /my/attachment/dir [DefaultValue("\"\"")] [UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)] public string FilePath { get; set; } @@ -136,12 +155,14 @@ public class Attachment /// /// If set true and no files match the given path, an exception is thrown. /// + /// true [UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)] public bool ThrowExceptionIfAttachmentNotFound { get; set; } /// /// If set true and no files match the given path, email will be sent nevertheless. /// + /// true [UIHint(nameof(AttachmentType), "", AttachmentType.FileAttachment)] public bool SendIfNoAttachmentsFound { get; set; } } @@ -163,13 +184,17 @@ public class AttachmentFromString /// /// Content of the attachment file /// + /// My attachment content [DefaultValue("\"\"")] + [DisplayFormat(DataFormatString = "Text")] public string FileContent { get; set; } /// /// Name of the attachment file /// + /// MyAttachment.txt [DefaultValue("\"\"")] + [DisplayFormat(DataFormatString = "Text")] public string FileName { get; set; } } } diff --git a/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Frends.Smtp.SendEmail.csproj b/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Frends.Smtp.SendEmail.csproj index 656f830..42115f5 100644 --- a/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Frends.Smtp.SendEmail.csproj +++ b/Frends.SMTP.SendEmail/Frends.Smtp.SendEmail/Frends.Smtp.SendEmail.csproj @@ -7,8 +7,14 @@ Frends Frends Frends + Frends + MIT + https://github.com/FrendsPlatform/Frends.SMTP + true + Frends Task for sending emails using SMTP protocol. https://frends.com/ + true