We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a24d6d commit 87441aeCopy full SHA for 87441ae
src/FluentEmail.Core/Email.cs
@@ -461,7 +461,7 @@ public IFluentEmail Attach(IEnumerable<Attachment> attachments)
461
462
public IFluentEmail AttachFromFilename(string filename, string contentType = null, string attachmentName = null)
463
{
464
- var stream = File.OpenRead(filename);
+ var stream = new MemoryStream(File.ReadAllBytes(filename));
465
Attach(new Attachment
466
467
Data = stream,
0 commit comments