选择语言 :

Core_Email

EMAIL核心类

API - Core_Email

author
呼吸二氧化碳 jonwang@myqee.com
category
MyQEE
package
System
subpackage
Core
copyright
Copyright © 2008-2013 myqee.com
license
http://www.myqee.com/license.html

$this->__construct( )

Constructor - Sets Email Preferences

The constructor can be passed an array of config values

返回值
  • void

Email::factory( $config = array ( ))

获取一个实例化后的Email的对象

参数列表

参数 类型 描述 默认值
$config array $config array(0)
返回值
  • Email

$this->initialize( $config = array ( ))

Initialize preferences

参数列表

参数 类型 描述 默认值
$config array array(0)
返回值
  • void

$this->clear( $clear_attachments = false)

Initialize the Email Data

参数列表

参数 类型 描述 默认值
$clear_attachments bool bool false
返回值
  • Email

$this->from( $from , $name = '')

Set FROM

参数列表

参数 类型 描述 默认值
$from string
$name string empty
返回值
  • Email

$this->reply_to( $replyto , $name = '')

Set Reply-to

参数列表

参数 类型 描述 默认值
$replyto string
$name string empty
返回值
  • Email

$this->to( $to )

Set Recipients

参数列表

参数 类型 描述 默认值
$to string
返回值
  • Email

$this->cc( $cc )

Set CC

参数列表

参数 类型 描述 默认值
$cc string
返回值
  • Email

$this->bcc( $bcc , $limit = '')

Set BCC

参数列表

参数 类型 描述 默认值
$bcc string
$limit string empty
返回值
  • Email

$this->subject( $subject )

Set Email Subject

参数列表

参数 类型 描述 默认值
$subject string
返回值
  • Email

$this->message( $body )

Set Body

参数列表

参数 类型 描述 默认值
$body string
返回值
  • Email

$this->attach( $filename , $disposition = '', $newname = null, $mime = '')

Assign file attachments

参数列表

参数 类型 描述 默认值
$filename string
$disposition unknown empty
$newname unknown null
$mime unknown empty
返回值
  • Email

$this->set_header( $header , $value )

Add a Header Item

参数列表

参数 类型 描述 默认值
$header string
$value string
返回值
  • void

$this->_str_to_array( $email )

Convert a String to an Array

参数列表

参数 类型 描述 默认值
$email string
返回值
  • array

$this->set_alt_message( $str = '')

Set Multipart Value

参数列表

参数 类型 描述 默认值
$str string empty
返回值
  • Email

$this->set_mailtype( $type = 'text')

Set Mailtype

参数列表

参数 类型 描述 默认值
$type string string(4) "text"
返回值
  • Email

$this->set_wordwrap( $wordwrap = true)

Set Wordwrap

参数列表

参数 类型 描述 默认值
$wordwrap bool bool true
返回值
  • Email

$this->set_protocol( $protocol = 'mail')

Set Protocol

参数列表

参数 类型 描述 默认值
$protocol string string(4) "mail"
返回值
  • Email

$this->set_priority( $n = 3)

Set Priority

参数列表

参数 类型 描述 默认值
$n int integer 3
返回值
  • Email

$this->set_newline( $newline = ' ')

Set Newline Character

参数列表

参数 类型 描述 默认值
$newline string string(1) " "
返回值
  • Email

$this->set_crlf( $crlf = ' ')

Set CRLF

参数列表

参数 类型 描述 默认值
$crlf string string(1) " "
返回值
  • Email

$this->_set_boundaries( )

Set Message Boundary

返回值
  • void

$this->_get_message_id( )

Get the Message ID

返回值
  • string

$this->_get_protocol( $return = true)

Get Mail Protocol

参数列表

参数 类型 描述 默认值
$return bool bool true
返回值
  • mixed

$this->_get_encoding( $return = true)

Get Mail Encoding

参数列表

参数 类型 描述 默认值
$return bool bool true
返回值
  • string

$this->_get_content_type( )

Get content type (text/html/attachment)

返回值
  • string

$this->_set_date( )

Set RFC 822 Date

返回值
  • string

$this->_get_mime_message( )

Mime message

返回值
  • string

$this->validate_email( $email )

Validate Email Address

参数列表

参数 类型 描述 默认值
$email string
返回值
  • bool

$this->valid_email( $address )

Email Validation

参数列表

参数 类型 描述 默认值
$address string
返回值
  • bool

$this->clean_email( $email )

Clean Extended Email Address: Joe Smith joe@smith.com

参数列表

参数 类型 描述 默认值
$email string
返回值
  • string

$this->_get_alt_message( )

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

$this->word_wrap( $str , $charlim = '')

Word Wrap

参数列表

参数 类型 描述 默认值
$str string
$charlim int empty
返回值
  • string

$this->_build_headers( )

Build final headers

返回值
  • string

$this->_write_headers( )

Write Headers as a string

返回值
  • void

$this->_build_message( )

Build Final Body and attachments

返回值
  • void

$this->_prep_quoted_printable( $str , $charlim = '')

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

$this->_prep_q_encoding( $str , $from = false)

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

$this->send( )

Send Email

返回值
  • bool

$this->batch_bcc_send( )

Batch Bcc Send. Sends groups of BCCs in batches

返回值
  • void

$this->_unwrap_specials( )

Unwrap special elements

返回值
  • void

$this->_remove_nl_callback( )

Strip line-breaks via callback

返回值
  • string

$this->_spool_email( )

Spool mail to the mail server

返回值
  • bool

$this->_send_with_mail( )

Send using mail()

返回值
  • bool

$this->_send_with_sendmail( )

Send using Sendmail

返回值
  • bool

$this->_send_with_smtp( )

Send using SMTP

返回值
  • bool

$this->_smtp_connect( )

SMTP Connect

返回值
  • string

$this->_send_command( $cmd , $data = '')

Send SMTP command

参数列表

参数 类型 描述 默认值
$cmd string
$data string empty
返回值
  • string

$this->_smtp_authenticate( )

SMTP Authenticate

返回值
  • bool

$this->_send_data( )

Send SMTP data

返回值
  • bool

$this->_get_smtp_data( )

Get SMTP data

返回值
  • string

$this->_get_hostname( )

Get Hostname

返回值
  • string

$this->_get_ip( )

Get IP

返回值
  • string

$this->print_debugger( )

Get Debug Message

返回值
  • string

$this->_set_error_message( $msg , $val = '')

Set Message

参数列表

参数 类型 描述 默认值
$msg string
$val unknown empty
返回值
  • void

$this->_mime_types( $ext = '')

Mime Types

参数列表

参数 类型 描述 默认值
$ext string empty
返回值
  • string