mirror of
https://github.com/Alee14/OpenHacknet.git
synced 2025-01-22 17:25:15 -05:00
29 lines
No EOL
896 B
C#
29 lines
No EOL
896 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Hacknet.Mission
|
|
{
|
|
internal class SendEmailMission : MisisonGoal
|
|
{
|
|
private readonly string mailRecipient;
|
|
private readonly string mailSubject;
|
|
private readonly MailServer server;
|
|
|
|
public SendEmailMission(string mailServerID, string mailRecipient, string proposedEmailSubject, OS _os)
|
|
{
|
|
server = (MailServer) Programs.getComputer(_os, mailServerID).getDaemon(typeof (MailServer));
|
|
mailSubject = proposedEmailSubject;
|
|
this.mailRecipient = mailRecipient;
|
|
}
|
|
|
|
public override bool isComplete(List<string> additionalDetails = null)
|
|
{
|
|
if (server == null)
|
|
return true;
|
|
return server.MailWithSubjectExists(mailRecipient, mailSubject);
|
|
}
|
|
|
|
public override void reset()
|
|
{
|
|
}
|
|
}
|
|
} |