diff --git a/src/Senders/FluentEmail.Smtp/SmtpSender.cs b/src/Senders/FluentEmail.Smtp/SmtpSender.cs
index 4b13d288..6d214370 100644
--- a/src/Senders/FluentEmail.Smtp/SmtpSender.cs
+++ b/src/Senders/FluentEmail.Smtp/SmtpSender.cs
@@ -3,6 +3,7 @@
using FluentEmail.Core.Models;
using System;
using System.Net.Mail;
+using System.Net.Mime;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -146,9 +147,12 @@ private MailMessage CreateMailMessage(IFluentEmail email)
data.Attachments.ForEach(x =>
{
- System.Net.Mail.Attachment a = new System.Net.Mail.Attachment(x.Data, x.Filename, x.ContentType);
+ System.Net.Mail.Attachment a = new System.Net.Mail.Attachment(x.Data, x.Filename, x.ContentType)
+ {
+ ContentId = x.ContentId
+ };
- a.ContentId = x.ContentId;
+ a.ContentDisposition.Inline = x.IsInline;
message.Attachments.Add(a);
});
diff --git a/test/FluentEmail.Core.Tests/Attachments/fluentemail_logo_64x64.png b/test/FluentEmail.Core.Tests/Attachments/fluentemail_logo_64x64.png
new file mode 100644
index 00000000..1aab18dc
Binary files /dev/null and b/test/FluentEmail.Core.Tests/Attachments/fluentemail_logo_64x64.png differ
diff --git a/test/FluentEmail.Core.Tests/FluentEmail.Core.Tests.csproj b/test/FluentEmail.Core.Tests/FluentEmail.Core.Tests.csproj
index cc26ca67..fc3ed0cb 100644
--- a/test/FluentEmail.Core.Tests/FluentEmail.Core.Tests.csproj
+++ b/test/FluentEmail.Core.Tests/FluentEmail.Core.Tests.csproj
@@ -30,6 +30,9 @@