CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.2 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.2
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • AbstractTransport
  • CakeEmail
  • DebugTransport
  • MailTransport
  • SmtpTransport

Class SmtpTransport

Send mail using SMTP protocol

AbstractTransport
Extended by SmtpTransport
Package: Cake\Network\Email
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: Cake/Network/Email/SmtpTransport.php

Properties summary

  • $_cakeEmail protected
    CakeEmail
    CakeEmail
  • $_content protected
    string
    Content of email to return
  • $_socket protected
    CakeSocket
    Socket to SMTP server

Inherited Properties

  • _config

Method Summary

  • _auth() protected
    Send authentication
  • _connect() protected
    Connect to SMTP Server
  • _disconnect() protected
    Disconnect
  • _generateSocket() protected
    Helper method to generate socket
  • _sendData() protected
    Send Data
  • _sendRcpt() protected
    Send emails
  • _smtpSend() protected
    Protected method for sending data to SMTP connection
  • config() public
    Set the configuration
  • send() public
    Send mail

Method Detail

_auth() protected ¶

_auth( )

Send authentication

Throws
SocketException

_connect() protected ¶

_connect( )

Connect to SMTP Server

Throws
SocketException

_disconnect() protected ¶

_disconnect( )

Disconnect

Throws
SocketException

_generateSocket() protected ¶

_generateSocket( )

Helper method to generate socket

Throws
SocketException

_sendData() protected ¶

_sendData( )

Send Data

Throws
SocketException

_sendRcpt() protected ¶

_sendRcpt( )

Send emails

Throws
SocketException

_smtpSend() protected ¶

_smtpSend( string $data , string|boolean $checkCode = '250' )

Protected method for sending data to SMTP connection

Parameters
string $data
data to be sent to SMTP server
string|boolean $checkCode optional '250'
code to check for in server response, false to skip
Throws
SocketException

config() public ¶

config( array $config = array() )

Set the configuration

Parameters
array $config optional array()
Overrides
AbstractTransport::config()

send() public ¶

send( CakeEmail $email )

Send mail

Parameters
CakeEmail $email
CakeEmail
Returns
array
Throws
SocketException

Methods inherited from AbstractTransport

_headersToString() protected ¶

_headersToString( array $headers , string $eol = "\r\n" )

Help to convert headers in string

Parameters
array $headers
Headers in format key => value
string $eol optional "\r\n"
Returns
string

Properties detail

$_cakeEmail ¶

protected CakeEmail

CakeEmail

$_content ¶

protected string

Content of email to return

$_socket ¶

protected CakeSocket

Socket to SMTP server

OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs