EmailRecipient
EmailRecipient Class.
A class representing a recipient for a MailMessage, with associated parameters.
Tags
Table of Contents
| string | ||
| $name | string | |
| $params | array | |
| $cc | array | |
| $bcc | array | |
| __construct() | Create a new EmailRecipient instance. | mixed | 
| cc() | Add a CC for this primary recipient. | mixed | 
| bcc() | Add a BCC for this primary recipient. | mixed | 
| getEmail() | Get the primary recipient email address. | string | 
| getName() | Get the primary recipient name. | string | 
| getParams() | Get the parameters to use when rendering the template this recipient. | array | 
| getCCs() | Get the list of CCs for this recipient. | array | 
| getBCCs() | Get the list of BCCs for this recipient. | array | 
Properties
        protected
                string
        $email
            
            
$name
        protected
                string
        $name
            
            
$params
        protected
                array
        $params
         = []    
            
$cc
        protected
                array
        $cc
         = []    
            
$bcc
        protected
                array
        $bcc
         = []    
            
Methods
__construct()
Create a new EmailRecipient instance.
        public
                                __construct(
                    
                            $email :
                string
                            
                    
            [,                 $name :
                string
                 = '' ]            
                    
            [,                 $params :
                array
                 = [] ]            
                )
        : mixed
    
    
            Parameters
- $email : string
 The primary recipient email address.
- $name : string = ''
 The primary recipient name.
- $params : array = []
 An array of template parameters to render the email message with for this particular recipient.
Return values
mixedcc()
Add a CC for this primary recipient.
        public
                                cc(
                    
                            $email :
                string
                            
                    
            [,                 $name :
                string
                 = '' ]            
                )
        : mixed
    
    
            Parameters
- $email : string
 The CC recipient email address.
- $name : string = ''
 The CC recipient name.
Return values
mixedbcc()
Add a BCC for this primary recipient.
        public
                                bcc(
                    
                            $email :
                string
                            
                    
            [,                 $name :
                string
                 = '' ]            
                )
        : mixed
    
    
            Parameters
- $email : string
 The BCC recipient email address.
- $name : string = ''
 The BCC recipient name.
Return values
mixedgetEmail()
Get the primary recipient email address.
        public
                                getEmail(
                )
        : string
    
    
    
        
            Return values
string —the primary recipient email address.
getName()
Get the primary recipient name.
        public
                                getName(
                )
        : string
    
    
    
        
            Return values
string —the primary recipient name.
getParams()
Get the parameters to use when rendering the template this recipient.
        public
                                getParams(
                )
        : array
    
    
    
        
            Return values
array —The parameters (name => value) to use when rendering an email template for this recipient.
getCCs()
Get the list of CCs for this recipient.
        public
                                getCCs(
                )
        : array
    
    
    
        
            Return values
array —A list of CCs for this recipient.  Each CC is an associative array with email and name properties.
getBCCs()
Get the list of BCCs for this recipient.
        public
                                getBCCs(
                )
        : array
    
    
    
        
            Return values
array —A list of BCCs for this recipient.  Each BCC is an associative array with email and name properties.