mirror of https://github.com/abpframework/abp.git
7 changed files with 78 additions and 3 deletions
@ -0,0 +1,19 @@ |
|||
using Volo.Abp.BackgroundJobs; |
|||
|
|||
namespace Volo.Abp.Emailing |
|||
{ |
|||
public class BackgroundEmailSendingJob : BackgroundJob<BackgroundEmailSendingJobArgs> |
|||
{ |
|||
protected IEmailSender EmailSender { get; } |
|||
|
|||
public BackgroundEmailSendingJob(IEmailSender emailSender) |
|||
{ |
|||
EmailSender = emailSender; |
|||
} |
|||
|
|||
public override void Execute(BackgroundEmailSendingJobArgs args) |
|||
{ |
|||
EmailSender.Send(args.To, args.Subject, args.Body, args.IsBodyHtml); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.Emailing |
|||
{ |
|||
[Serializable] |
|||
public class BackgroundEmailSendingJobArgs |
|||
{ |
|||
public string To { get; set; } |
|||
|
|||
public string Subject { get; set; } |
|||
|
|||
public string Body { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool IsBodyHtml { get; set; } = true; |
|||
|
|||
//TODO: Add other properties and attachments
|
|||
} |
|||
} |
|||
Loading…
Reference in new issue