Overview

Packages

  • tipy

Classes

  • Tipy
  • TipyApp
  • TipyCli
  • TipyCliSession
  • TipyConfig
  • TipyController
  • TipyCookie
  • TipyDAO
  • TipyEnv
  • TipyFlash
  • TipyInflector
  • TipyInput
  • TipyIOWrapper
  • TipyLogger
  • TipyMailer
  • TipyModel
  • TipyOutput
  • TipyRequest
  • TipySession
  • TipyTestCase
  • TipyTestRunner
  • TipyView

Exceptions

  • AssertionFailedException
  • CompileErrorException
  • CompileWarningException
  • CoreErrorException
  • CoreWarningException
  • DeprecatedException
  • NoMethodException
  • NoticeException
  • ParseException
  • RecoverableErrorException
  • StrictException
  • TipyDaoException
  • TipyException
  • TipyModelException
  • TipyRollbackException
  • TipyValidationException
  • UserDeprecatedException
  • UserErrorException
  • UserNoticeException
  • UserWarningException
  • WarningException
  • Overview
  • Package
  • Class
  • Deprecated
  • Todo
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 
<?php
/**
 * TipyMailer
 *
 * @package tipy
 */

require_once(__DIR__.'/../vendor/PHPMailer/class.phpmailer.php');

/**
 * Uses PHPMailer to send messages
 *
 * {@link https://github.com/PHPMailer/PHPMailer}
 *
 * <code>
 * $mail = new TipyMailer;
 *
 * $mail->From = 'from@example.com';
 * $mail->FromName = 'Mailer';
 * $mail->addAddress('joe@example.net', 'Joe User');     // Add a recipient
 * $mail->addAddress('ellen@example.com');               // Name is optional
 * $mail->addReplyTo('info@example.com', 'Information');
 * $mail->addCC('cc@example.com');
 * $mail->addBCC('bcc@example.com');
 *
 * $mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
 * $mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
 * $mail->isHTML(true);                                  // Set email format to HTML
 *
 * $mail->Subject = 'Here is the subject';
 * $mail->Body = 'This is the HTML message body <b>in bold!</b>';
 * $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
 *
 * $mail->send();
 * </code>
 *
  */
class TipyMailer extends PHPMailer {

    /**
     * @internal
     */
    public function __construct() {
        // call PHPMailer constructor with throw exceptions param
        parent::__construct(true);
        $app = TipyApp::getInstance();
        $path = $app->config->get('mail_sendmail_path');
        ini_set('sendmail_path', $path);
        $this->isSendmail();
    }
}
tipy API documentation generated by ApiGen