<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */


class MailFactory
{
  
  public static function getSender($pSmtpMail)
  {
    if ($pSmtpMail->useDmz) {
      
      return new MailSenderDMZ($pSmtpMail);
    } elseif ($pSmtpMail->usephpmail) {
      
      return new MailSenderPHP($pSmtpMail);
    } elseif ($pSmtpMail->usephpmailer) {
      
      return new MailSenderPHPMailer($pSmtpMail);
    } else {
      
      return new MailSenderSMTP($pSmtpMail);
    }
  }
}