| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System.Net.Mail;
- using System.Threading.Tasks;
- namespace Abp.Net.Mail
- {
- /// <summary>
- /// This service can be used simply sending emails.
- /// </summary>
- public interface IEmailSender
- {
- /// <summary>
- /// Sends an email.
- /// </summary>
- Task SendAsync(string to, string subject, string body, bool isBodyHtml = true);
- /// <summary>
- /// Sends an email.
- /// </summary>
- void Send(string to, string subject, string body, bool isBodyHtml = true);
- /// <summary>
- /// Sends an email.
- /// </summary>
- Task SendAsync(string from, string to, string subject, string body, bool isBodyHtml = true);
- /// <summary>
- /// Sends an email.
- /// </summary>
- void Send(string from, string to, string subject, string body, bool isBodyHtml = true);
- /// <summary>
- /// Sends an email.
- /// </summary>
- /// <param name="mail">Mail to be sent</param>
- /// <param name="normalize">
- /// Should normalize email?
- /// If true, it sets sender address/name if it's not set before and makes mail encoding UTF-8.
- /// </param>
- void Send(MailMessage mail, bool normalize = true);
- /// <summary>
- /// Sends an email.
- /// </summary>
- /// <param name="mail">Mail to be sent</param>
- /// <param name="normalize">
- /// Should normalize email?
- /// If true, it sets sender address/name if it's not set before and makes mail encoding UTF-8.
- /// </param>
- Task SendAsync(MailMessage mail, bool normalize = true);
- }
- }
|