35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
namespace Ophelias.Reporting
|
|
{
|
|
internal class Email
|
|
{
|
|
/*
|
|
* This is a simple email class to mimic what fields
|
|
* would exist if we were to send an email.
|
|
*/
|
|
private readonly string to;
|
|
private readonly string subject = "Your payment is due soon!";
|
|
private readonly string body = "Hello valued customer, this is a reminder that your payment for your reservation is due soon, please login to the system and pay for your reservation. If you do not it will be canceled.";
|
|
private readonly string from = "no-reply@ophelias.oasis";
|
|
|
|
internal Email(string to)
|
|
{
|
|
this.to = to;
|
|
}
|
|
internal void Send()
|
|
{
|
|
/*
|
|
* Typically this function would send information or a built email
|
|
* to a mail server, however, since that was not in the design doc.
|
|
* a mockup was created to write what would go in the email to a
|
|
* text document.
|
|
*/
|
|
File.AppendAllText(Path.GetFullPath("Emails.txt"),
|
|
$"TO: {to}\n" +
|
|
$"FROM: {from}\n" +
|
|
$"SUBJECT: {subject}\n" +
|
|
$"MESSAGE: {body}\n" +
|
|
$"\n");
|
|
}
|
|
}
|
|
}
|