mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Merge branch 'feature/6196_SupportForAttachments' into 1.10.x
# Conflicts: # src/Orchard.Web/Modules/Orchard.Email/Services/SmtpMessageChannel.cs
This commit is contained in:
commit
bf2201c2a9
@ -124,6 +124,8 @@ namespace Orchard.Email.Services {
|
||||
foreach (var attachmentPath in emailMessage.Attachments) {
|
||||
if (File.Exists(attachmentPath)) {
|
||||
mailMessage.Attachments.Add(new Attachment(attachmentPath));
|
||||
} else {
|
||||
throw new FileNotFoundException(T("One or more attachments not found.").Text);
|
||||
}
|
||||
}
|
||||
_smtpClientField.Value.Send(mailMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user