New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MailMessage to MimeMessage conversion #2590
Conversation
…ssage to MimeMessage
src/Abp.MailKit/EmailExtensitons.cs
Outdated
if (contentType.MediaType.Equals("text", StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
// Original: part = new TextPart(contentType); | ||
// Due to consturctor of TextPart(ContentType contentType) being internal, mimic the instantiation by using MimePart(ContentType contentType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor
*- Break line after comma
src/Abp.MailKit/EmailExtensitons.cs
Outdated
/// </summary> | ||
/// <returns>The equivalent <see cref="MailboxAddress"/>.</returns> | ||
/// <param name="address">The mail address.</param> | ||
static MailboxAddress ToMailboxAddress(this MailAddress address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excess indentation (same for ToInternetAddressList
)
src/Abp.MailKit/EmailExtensitons.cs
Outdated
|
||
return message; | ||
} | ||
|
||
static MimePart GetMimePart(AttachmentBase item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make default private
access modifier obvious (same for ToMailboxAddress
and ToInternetAddressList
)
@acjh renamed the file since it has incorrect spelling. |
src/Abp.MailKit/EmailExtensions.cs
Outdated
/// </summary> | ||
/// <returns>The equivalent <see cref="MailboxAddress"/>.</returns> | ||
/// <param name="address">The mail address.</param> | ||
private static MailboxAddress ToMailboxAddress(this MailAddress address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excess indentation (same for ToInternetAddressList
)
Hi @hikalkan , as seen in #2442, I referred to the conversion method CreateFromMailMessage() and modified the
EmailExtensions.cs
inAbp.MailKit
package.The current release of
MimeKit 1.18.1
only supports up to Net Standard 1.3. and i think that the support for Net Standard 2.0 won't be coming so soon.