Skip to content

Commit

Permalink
Merge branch 'feature/6196_SupportForAttachments' into Laser/1.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
HermesSbicego-Laser committed Oct 28, 2016
2 parents 0daad70 + e3a7059 commit 5fe0b69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Web.Hosting;
using System.Web.Mvc;
using Orchard.ContentManagement;
using Orchard.Email.Models;
Expand Down Expand Up @@ -56,18 +57,19 @@ public ActionResult TestSettings(TestSmtpSettings testSettings) {
{"Body", testSettings.Body},
{"ReplyTo", testSettings.ReplyTo},
{"Bcc", testSettings.Bcc},
{"CC", testSettings.Cc}
{"CC", testSettings.Cc},
{ "Attachments", new List<string>() { HostingEnvironment.MapPath("~/Media/OrchardLogo.png") } }
});
}

if (!String.IsNullOrEmpty(fakeLogger.Message)) {
return Json(new { error = fakeLogger.Message });
}

return Json(new {status = T("Message sent.").Text});
return Json(new { status = T("Message sent.").Text });
}
catch (Exception e) {
return Json(new {error = e.Message});
return Json(new { error = e.Message });
}
finally {
var smtpChannelComponent = _smtpChannel as Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
<div>
<textarea id="emailtestbody"></textarea>
</div>
<div>
<label>@T("Attachments:")</label>
<img src="~/Media/OrchardLogo.png" style="width:100px" alt="@T("Orchard icon")" title="@T("The Orchard icon will be attached to this test e-mail")"/>
</div>
<div>
<button type="button" id="emailtestsend" class="button grey">@T("Send")</button>
</div>
Expand Down

0 comments on commit 5fe0b69

Please sign in to comment.