Assuming you have a base class Mail - or an interface IMail - with the two properties Subject and Body, you can create a derived class CompositeMail:
public class CompositeMail : Mail
{
private readonly List<Mail> _mails;
public CompositeMail(params Mail[] mails) : this(mails.AsEnumerable())
{
}
public CompositeMail(IEnumerable<Mail> mails)
{
if(mails == null) throw new ArgumentNullException("mails");
_mails = mails.ToList();
}
public override string Subject
{
get { return string.Join("/", _mails.Select(x => x.Subject)); }
}
public override string Body
{
get
{
return string.Join(Environment.NewLine, _mails.Select(x => x.Body));
}
}
}
This is an abbreviated implementation of the Composite pattern. "Abbreviated", because it doesn't contain methods the add, remove or enumerate the children. If you want to add this functionality, simply make CompositeMail additionally implement ICollection<Mail>.
You can instatiate it like this:
var compositeMail = new CompositeMail(mailA, mailB);
You can use this instance anywhere where you use a normal mail, because it derives from the Mail class you use elsewhere.