|
1 | 1 | using System; |
2 | 2 | using System.Collections.Generic; |
3 | 3 | using System.Text; |
| 4 | +using System.Threading.Tasks; |
4 | 5 |
|
5 | 6 | namespace NETCore.MailKit.Core |
6 | 7 | { |
7 | 8 | public class EmailService : IEmailService |
8 | 9 | { |
9 | | - |
| 10 | + private readonly IMailKitProvider _MailKitProvider; |
10 | 11 |
|
| 12 | + public EmailService(IMailKitProvider provider) |
| 13 | + { |
| 14 | + _MailKitProvider = provider; |
| 15 | + } |
| 16 | + |
| 17 | + /// <summary> |
| 18 | + /// send email with UTF-8 |
| 19 | + /// </summary> |
| 20 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 21 | + /// <param name="subject">subject</param> |
| 22 | + /// <param name="message">email message</param> |
| 23 | + /// <param name="isHtml">is set message as html</param> |
| 24 | + public void Send(string mailTo, string subject, string message, bool isHtml = false) |
| 25 | + { |
| 26 | + throw new NotImplementedException(); |
| 27 | + } |
| 28 | + |
| 29 | + |
| 30 | + /// <summary> |
| 31 | + /// send email |
| 32 | + /// </summary> |
| 33 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 34 | + /// <param name="subject">subject</param> |
| 35 | + /// <param name="message">email message</param> |
| 36 | + /// <param name="encoding">email message encoding</param> |
| 37 | + /// <param name="isHtml">is set message as html</param> |
| 38 | + public void Send(string mailTo, string subject, string message, Encoding encoding, bool isHtml = false) |
| 39 | + { |
| 40 | + throw new NotImplementedException(); |
| 41 | + } |
| 42 | + |
| 43 | + /// <summary> |
| 44 | + /// send email with UTF-8 |
| 45 | + /// </summary> |
| 46 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 47 | + /// <param name="mailCc">send cc,multi split with ","</param> |
| 48 | + /// <param name="mailBcc">send bcc,multi split with ","</param> |
| 49 | + /// <param name="subject">subject</param> |
| 50 | + /// <param name="message">email message</param> |
| 51 | + /// <param name="isHtml">is set message as html</param> |
| 52 | + public void Send(string mailTo, string mailCc, string mailBcc, string subject, string message, bool isHtml = false) |
| 53 | + { |
| 54 | + throw new NotImplementedException(); |
| 55 | + } |
| 56 | + |
| 57 | + /// <summary> |
| 58 | + /// send email |
| 59 | + /// </summary> |
| 60 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 61 | + /// <param name="mailCc">send cc,multi split with ","</param> |
| 62 | + /// <param name="mailBcc">send bcc,multi split with ","</param> |
| 63 | + /// <param name="subject">subject</param> |
| 64 | + /// <param name="message">email message</param> |
| 65 | + /// <param name="encoding">email message encoding</param> |
| 66 | + /// <param name="isHtml">is set message as html</param> |
| 67 | + public void Send(string mailTo, string mailCc, string mailBcc, string subject, string message, Encoding encoding, bool isHtml = false) |
| 68 | + { |
| 69 | + throw new NotImplementedException(); |
| 70 | + } |
| 71 | + |
| 72 | + |
| 73 | + /// <summary> |
| 74 | + /// send email with UTF-8 async |
| 75 | + /// </summary> |
| 76 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 77 | + /// <param name="subject">subject</param> |
| 78 | + /// <param name="message">email message</param> |
| 79 | + /// <param name="isHtml">is set message as html</param> |
| 80 | + public Task SendAsync(string mailTo, string subject, string message, bool isHtml = false) |
| 81 | + { |
| 82 | + throw new NotImplementedException(); |
| 83 | + } |
| 84 | + |
| 85 | + /// <summary> |
| 86 | + /// send email async |
| 87 | + /// </summary> |
| 88 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 89 | + /// <param name="subject">subject</param> |
| 90 | + /// <param name="message">email message</param> |
| 91 | + /// <param name="encoding">email message encoding</param> |
| 92 | + /// <param name="isHtml">is set message as html</param> |
| 93 | + |
| 94 | + public Task SendAsync(string mailTo, string subject, string message, Encoding encoding, bool isHtml = false) |
| 95 | + { |
| 96 | + throw new NotImplementedException(); |
| 97 | + } |
| 98 | + |
| 99 | + /// <summary> |
| 100 | + /// send email with UTF-8 async |
| 101 | + /// </summary> |
| 102 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 103 | + /// <param name="mailCc">send cc,multi split with ","</param> |
| 104 | + /// <param name="mailBcc">send bcc,multi split with ","</param> |
| 105 | + /// <param name="subject">subject</param> |
| 106 | + /// <param name="message">email message</param> |
| 107 | + /// <param name="isHtml">is set message as html</param> |
| 108 | + public Task SendAsync(string mailTo, string mailCc, string mailBcc, string subject, string message, bool isHtml = false) |
| 109 | + { |
| 110 | + throw new NotImplementedException(); |
| 111 | + } |
| 112 | + |
| 113 | + /// <summary> |
| 114 | + /// send email async |
| 115 | + /// </summary> |
| 116 | + /// <param name="mailTo">consignee email,multi split with ","</param> |
| 117 | + /// <param name="mailCc">send cc,multi split with ","</param> |
| 118 | + /// <param name="mailBcc">send bcc,multi split with ","</param> |
| 119 | + /// <param name="subject">subject</param> |
| 120 | + /// <param name="message">email message</param> |
| 121 | + /// <param name="encoding">email message encoding</param> |
| 122 | + /// <param name="isHtml">is set message as html</param> |
| 123 | + public Task SendAsync(string mailTo, string mailCc, string mailBcc, string subject, string message, Encoding encoding, bool isHtml = false) |
| 124 | + { |
| 125 | + throw new NotImplementedException(); |
| 126 | + } |
11 | 127 | } |
12 | 128 | } |
0 commit comments