Skip to content

Instantly share code, notes, and snippets.

@mikeobrien
Created December 8, 2010 17:46
Show Gist options
  • Save mikeobrien/733619 to your computer and use it in GitHub Desktop.
Save mikeobrien/733619 to your computer and use it in GitHub Desktop.
public interface IMailService
{
void Send(string sender, string recipient, string subject, string body);
}
public class MessageEntity
{
//...
public void SendThrough(IMailService mailService)
{
string subject = isReply ? "Re : " + title : title;
mailService.Send(sender, recipient, subject, GetMessageBody(content));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment