EMAIL核心类
API - Core_Email
- Email::$useragent
- Email::$mailpath
- Email::$protocol
- Email::$smtp_host
- Email::$smtp_user
- Email::$smtp_pass
- Email::$smtp_port
- Email::$smtp_timeout
- Email::$smtp_crypto
- Email::$wordwrap
- Email::$wrapchars
- Email::$mailtype
- Email::$charset
- Email::$multipart
- Email::$alt_message
- Email::$validate
- Email::$priority
- Email::$newline
- Email::$crlf
- Email::$dsn
- Email::$send_multipart
- Email::$bcc_batch_mode
- Email::$bcc_batch_size
- Email::__construct - Constructor - Sets Email Preferences
- Email::factory - 获取一个实例化后的Email的对象
- Email::initialize - Initialize preferences
- Email::clear - Initialize the Email Data
- Email::from - Set FROM
- Email::reply_to - Set Reply-to
- Email::to - Set Recipients
- Email::cc - Set CC
- Email::bcc - Set BCC
- Email::subject - Set Email Subject
- Email::message - Set Body
- Email::attach - Assign file attachments
- Email::set_header - Add a Header Item
- Email::set_alt_message - Set Multipart Value
- Email::set_mailtype - Set Mailtype
- Email::set_wordwrap - Set Wordwrap
- Email::set_protocol - Set Protocol
- Email::set_priority - Set Priority
- Email::set_newline - Set Newline Character
- Email::set_crlf - Set CRLF
- Email::validate_email - Validate Email Address
- Email::valid_email - Email Validation
- Email::clean_email - Clean Extended Email Address: Joe Smith
- Email::word_wrap - Word Wrap
- Email::send - Send Email
- Email::batch_bcc_send - Batch Bcc Send. Sends groups of BCCs in batches
- Email::print_debugger - Get Debug Message
Constructor - Sets Email Preferences
The constructor can be passed an array of config values
void
获取一个实例化后的Email的对象
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$config |
array |
$config | array(0) |
Email
Initialize preferences
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$config |
array |
array(0) |
void
Initialize the Email Data
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$clear_attachments |
bool |
bool false |
Email
Set FROM
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$from |
string |
||
$name |
string |
empty |
Email
Set Reply-to
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$replyto |
string |
||
$name |
string |
empty |
Email
Set Recipients
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$to |
string |
Email
Set CC
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$cc |
string |
Email
Set BCC
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$bcc |
string |
||
$limit |
string |
empty |
Email
Set Email Subject
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$subject |
string |
Email
Set Body
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$body |
string |
Email
Assign file attachments
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$filename |
string |
||
$disposition |
unknown |
empty | |
$newname |
unknown |
null | |
$mime |
unknown |
empty |
Email
Add a Header Item
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$header |
string |
||
$value |
string |
void
Convert a String to an Array
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$email |
string |
array
Set Multipart Value
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$str |
string |
empty |
Email
Set Mailtype
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$type |
string |
string(4) "text" |
Email
Set Wordwrap
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$wordwrap |
bool |
bool true |
Email
Set Protocol
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$protocol |
string |
string(4) "mail" |
Email
Set Priority
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$n |
int |
integer 3 |
Email
Set Newline Character
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$newline |
string |
string(1) " " |
Email
Set CRLF
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$crlf |
string |
string(1) " " |
Email
Set Message Boundary
void
Get the Message ID
string
Get Mail Protocol
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$return |
bool |
bool true |
mixed
Get Mail Encoding
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$return |
bool |
bool true |
string
Get content type (text/html/attachment)
string
Set RFC 822 Date
string
Mime message
string
Validate Email Address
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$email |
string |
bool
Email Validation
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$address |
string |
bool
Clean Extended Email Address: Joe Smith joe@smith.com
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$email |
string |
string
Build alternative plain text message
This public function provides the raw message for use in plain-text headers of HTML-formatted emails. If the user hasn't specified his own alternative message it creates one by stripping the HTML
string
Word Wrap
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$str |
string |
||
$charlim |
int |
empty |
string
Build final headers
string
Write Headers as a string
void
Build Final Body and attachments
void
Prep Quoted Printable
Prepares string for Quoted-Printable Content-Transfer-Encoding Refer to RFC 2045 http://www.ietf.org/rfc/rfc2045.txt
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$str |
string |
||
$charlim |
int |
empty |
string
Prep Q Encoding
Performs "Q Encoding" on a string for use in email headers. It's related but not identical to quoted-printable, so it has its own method
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$str |
string |
||
$from |
bool |
Set to true for processing From: headers | bool false |
string
Send Email
bool
Batch Bcc Send. Sends groups of BCCs in batches
void
Unwrap special elements
void
Strip line-breaks via callback
string
Spool mail to the mail server
bool
Send using mail()
bool
Send using Sendmail
bool
Send using SMTP
bool
SMTP Connect
string
Send SMTP command
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$cmd |
string |
||
$data |
string |
empty |
string
SMTP Authenticate
bool
Send SMTP data
bool
Get SMTP data
string
Get Hostname
string
Get IP
string
Get Debug Message
string
Set Message
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$msg |
string |
||
$val |
unknown |
empty |
void