feat: added Email connectivity
Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
b05eba37f1
commit
7049eac400
2 changed files with 29 additions and 0 deletions
25
ImageBoardServerApp/Util/Postman.cs
Normal file
25
ImageBoardServerApp/Util/Postman.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System.Net;
|
||||
using System.Net.Mail;
|
||||
|
||||
namespace ImageBoardServerApp.Util;
|
||||
|
||||
public static class Postman
|
||||
{
|
||||
private static SmtpClient smtpClient;
|
||||
|
||||
public static void logon()
|
||||
{
|
||||
smtpClient = new SmtpClient("smtp.bulletboards.xyz")
|
||||
{
|
||||
Port = 587,
|
||||
Credentials = new NetworkCredential("noreply@bulletboards.xyz", "frogARdI,97,#"),
|
||||
EnableSsl = true,
|
||||
};
|
||||
}
|
||||
|
||||
public static void sendMail(string to, string subj, string body)
|
||||
{
|
||||
smtpClient.Send("noreply@bulletboards.xyz", to, subj, body);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue