Skip to content
Snippets Groups Projects
Select Git revision
  • 4932c63bc7408c7cf77d05defb1a5d9179f760e3
  • main default protected
  • devel
  • 1.0.0
4 results

Email.php

Blame
  • Email.php 4.17 KiB
    <?php
    
    namespace WPDesk\Library\WPEmail\Abstracts;
    
    use Exception;
    
    class Email {
    
        /**
         * @var array
         */
        private array $recipients = [];
    
        /**
         * @var string
         */
        private string $subject = '';
    
        /**
         * @var array
         */
        private array $attachments = [];
    
        /**
         * @var string
         */
        private string $content = '';
    
        /**
         * @var array
         */
        private array $headers = [ 'Content-Type' => 'text/html' ];
    
        /**
         * @var string
         */
        private string $from_email;
    
        /**
         * @var string
         */
        private string $from_name;
    
        /**
         * @var array
         */
        private array $template_attributes;
    
        /**
         * @param string $from_email
         *
         * @return self
         */
        public function set_from( string $from_email ): self {
            $this->from_email = $from_email;
    
            return $this;
        }
    
        /**
         * @return string
         */
        public function get_from(): string {
            return $this->from_email;
        }
    
        /**
         * @param string $from_name
         *
         * @return self