mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Merge branch 'feature/6196_SupportForAttachments' into Laser/1.10.x
This commit is contained in:
commit
5fe0b69c6b
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Web.Hosting;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.Email.Models;
|
using Orchard.Email.Models;
|
||||||
@ -56,7 +57,8 @@ namespace Orchard.Email.Controllers {
|
|||||||
{"Body", testSettings.Body},
|
{"Body", testSettings.Body},
|
||||||
{"ReplyTo", testSettings.ReplyTo},
|
{"ReplyTo", testSettings.ReplyTo},
|
||||||
{"Bcc", testSettings.Bcc},
|
{"Bcc", testSettings.Bcc},
|
||||||
{"CC", testSettings.Cc}
|
{"CC", testSettings.Cc},
|
||||||
|
{ "Attachments", new List<string>() { HostingEnvironment.MapPath("~/Media/OrchardLogo.png") } }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,10 +66,10 @@ namespace Orchard.Email.Controllers {
|
|||||||
return Json(new { error = 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) {
|
catch (Exception e) {
|
||||||
return Json(new {error = e.Message});
|
return Json(new { error = e.Message });
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
var smtpChannelComponent = _smtpChannel as Component;
|
var smtpChannelComponent = _smtpChannel as Component;
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<textarea id="emailtestbody"></textarea>
|
<textarea id="emailtestbody"></textarea>
|
||||||
</div>
|
</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>
|
<div>
|
||||||
<button type="button" id="emailtestsend" class="button grey">@T("Send")</button>
|
<button type="button" id="emailtestsend" class="button grey">@T("Send")</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user