27 lines
517 B
C#
27 lines
517 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace MailServer
|
|
{
|
|
public class Mail
|
|
{
|
|
public string From { get; private set; }
|
|
public string To { get; private set; }
|
|
|
|
public string Data { get; set; }
|
|
|
|
public Mail(string from, string to, string data)
|
|
{
|
|
From = from;
|
|
To = to;
|
|
Data = data;
|
|
}
|
|
|
|
public string GetSenderDomain()
|
|
{
|
|
return From.Split('@')[1];
|
|
}
|
|
}
|
|
}
|