PHP Class WPDKMail

## Overview Extends WPDKPost with useful method and property to mail.
Author: =undo= ([email protected])
Inheritance: extends WPDKPost
Datei anzeigen Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$bcc string Header for carbon copy
$cc string Header for carbon copy

Public Methods

Method Description
__construct ( string | integer | object | null $mail = null, string $post_type = 'page' ) : WPDKMail Create an instance of WPDKMail class
postTypes ( ) : array Return the array with the available post type used to send a mail.
send ( string | integer $to, boolean | string $subject = false, boolean | integer | string $from = '', array $placeholders = [] ) : boolean | WPDKError Perform a send mail. Return FALSE if an error occour.

Private Methods

Method Description
headers ( ) : string Return the computated header for mail

Method Details

__construct() public method

Create an instance of WPDKMail class
public __construct ( string | integer | object | null $mail = null, string $post_type = 'page' ) : WPDKMail
$mail string | integer | object | null Optional. Post ID, post object, post slug or null
$post_type string Optional. If $record is a string (slug) then this is the post type where search. Default is 'page'
return WPDKMail

postTypes() public static method

Return the array with the available post type used to send a mail.
public static postTypes ( ) : array
return array

send() public method

Perform a send mail. Return FALSE if an error occour.
public send ( string | integer $to, boolean | string $subject = false, boolean | integer | string $from = '', array $placeholders = [] ) : boolean | WPDKError
$to string | integer String target 'name ' or user id
$subject boolean | string Optional. String subject for this mail, if FALSE will bw used the title of post-mail
$from boolean | integer | string Optional. String from 'name ' or user id, set to empty to use default blog name and admin email
$placeholders array Optional. A Key value pairs with placeholders substitution.
return boolean | WPDKError

Property Details

$bcc public_oe property

Header for carbon copy
Since: 1.4.9
public string $bcc
return string

$cc public_oe property

Header for carbon copy
Since: 1.4.9
public string $cc
return string