Added core pricing metafield and status check job
This commit is contained in:
@@ -15,28 +15,53 @@ namespace PartSource.Automation.Services
|
||||
|
||||
public EmailService(EmailConfiguration emailConfiguration)
|
||||
{
|
||||
_emailConfiguration = emailConfiguration;
|
||||
_emailConfiguration = emailConfiguration;
|
||||
}
|
||||
|
||||
public void Send(string subject, string body)
|
||||
{
|
||||
using (SmtpClient smtpClient = new SmtpClient { Host = _emailConfiguration.SmtpHost })
|
||||
using SmtpClient smtpClient = new SmtpClient
|
||||
{
|
||||
MailMessage mailMessage = new MailMessage
|
||||
{
|
||||
From = new MailAddress(_emailConfiguration.From),
|
||||
Subject = subject,
|
||||
Body = body,
|
||||
IsBodyHtml = true
|
||||
};
|
||||
Host = _emailConfiguration.SmtpHost
|
||||
};
|
||||
|
||||
foreach (string address in _emailConfiguration.To.Split(','))
|
||||
{
|
||||
mailMessage.To.Add(address);
|
||||
}
|
||||
using MailMessage mailMessage = new MailMessage
|
||||
{
|
||||
From = new MailAddress(_emailConfiguration.From),
|
||||
Subject = subject,
|
||||
Body = body,
|
||||
IsBodyHtml = true
|
||||
};
|
||||
|
||||
smtpClient.Send(mailMessage);
|
||||
foreach (string address in _emailConfiguration.To.Split(','))
|
||||
{
|
||||
mailMessage.To.Add(address);
|
||||
}
|
||||
|
||||
smtpClient.Send(mailMessage);
|
||||
}
|
||||
|
||||
public void Send(string to, string subject, string body)
|
||||
{
|
||||
using SmtpClient smtpClient = new SmtpClient
|
||||
{
|
||||
Host = _emailConfiguration.SmtpHost
|
||||
};
|
||||
|
||||
using MailMessage mailMessage = new MailMessage
|
||||
{
|
||||
From = new MailAddress(_emailConfiguration.From),
|
||||
Subject = subject,
|
||||
Body = body,
|
||||
IsBodyHtml = false
|
||||
};
|
||||
|
||||
foreach (string address in _emailConfiguration.To.Split(','))
|
||||
{
|
||||
mailMessage.To.Add(to);
|
||||
}
|
||||
|
||||
smtpClient.Send(mailMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user