dotnet-core_mail-server/MailServer/Mail.cs

27 lines
517 B
C#
Raw Normal View History

2016-11-26 11:11:27 +00:00
using System;
using System.Collections.Generic;
using System.Text;
2016-11-27 17:38:47 +00:00
namespace MailServer
2016-11-26 11:11:27 +00:00
{
public class Mail
{
public string From { get; private set; }
2016-11-27 17:38:47 +00:00
public string To { get; private set; }
2016-11-26 11:11:27 +00:00
2016-11-27 17:38:47 +00:00
public string Data { get; set; }
2016-11-26 11:11:27 +00:00
2016-11-27 17:38:47 +00:00
public Mail(string from, string to, string data)
2016-11-26 11:11:27 +00:00
{
2016-11-27 17:38:47 +00:00
From = from;
To = to;
Data = data;
2016-11-26 11:11:27 +00:00
}
public string GetSenderDomain()
{
return From.Split('@')[1];
}
}
}