HumHub Documentation (unofficial)

SendgridSmtpTransport extends EsmtpTransport
in package

Sends Emails over SMTP with ESMTP support.

Tags
author

Kevin Verschaeve

Table of Contents

Properties

$authenticators  : mixed
$dispatcher  : mixed
$domain  : mixed
$lastMessageTime  : mixed
$lastSent  : mixed
$logger  : mixed
$password  : mixed
$pingThreshold  : mixed
$rate  : mixed
$restartCounter  : mixed
$restartThreshold  : mixed
$restartThresholdSleep  : mixed
$started  : mixed
$stream  : mixed
$username  : mixed

Methods

__construct()  : mixed
__destruct()  : mixed
__sleep()  : array<string|int, mixed>
__toString()  : string
__wakeup()  : mixed
addAuthenticator()  : void
getLocalDomain()  : string
Gets the name of the domain that will be used in HELO.
getPassword()  : string
getStream()  : AbstractStream
getUsername()  : string
send()  : SentMessage|null
setLocalDomain()  : $this
Sets the name of the local domain that will be used in HELO.
setMaxPerSecond()  : $this
Sets the maximum number of messages to send per second (0 to disable).
setPassword()  : $this
setPingThreshold()  : $this
Sets the minimum number of seconds required between two messages, before the server is pinged.
setRestartThreshold()  : $this
Sets the maximum number of messages to send before re-starting the transport.
setUsername()  : $this
doHeloCommand()  : void
doSend()  : void
getLogger()  : LoggerInterface
stringifyAddresses()  : array<string|int, string>
assertResponseCode()  : void
callHeloCommand()  : array<string|int, mixed>
checkRestartThreshold()  : void
checkThrottling()  : mixed
doMailFromCommand()  : void
doRcptToCommand()  : void
getFullResponse()  : string
handleAuth()  : void
ping()  : void
start()  : void
stop()  : void

Properties

$restartThresholdSleep

private mixed $restartThresholdSleep = 0

Methods

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__toString()

public __toString() : string
Return values
string

getLocalDomain()

Gets the name of the domain that will be used in HELO.

public getLocalDomain() : string

If an IP address was specified, this will be returned wrapped in square brackets as described in RFC 5321, section 4.1.3.

Return values
string

getPassword()

public getPassword() : string
Return values
string

getStream()

public getStream() : AbstractStream
Return values
AbstractStream

getUsername()

public getUsername() : string
Return values
string

setLocalDomain()

Sets the name of the local domain that will be used in HELO.

public setLocalDomain(string $domain) : $this

This should be a fully-qualified domain name and should be truly the domain you're using.

If your server does not have a domain name, use the IP address. This will automatically be wrapped in square brackets as described in RFC 5321, section 4.1.3.

Parameters
$domain : string
Return values
$this

setMaxPerSecond()

Sets the maximum number of messages to send per second (0 to disable).

public setMaxPerSecond(float $rate) : $this
Parameters
$rate : float
Return values
$this

setPassword()

public setPassword(string $password) : $this
Parameters
$password : string
Return values
$this

setPingThreshold()

Sets the minimum number of seconds required between two messages, before the server is pinged.

public setPingThreshold(int $seconds) : $this

If the transport wants to send a message and the time since the last message exceeds the specified threshold, the transport will ping the server first (NOOP command) to check if the connection is still alive. Otherwise the message will be sent without pinging the server first.

Do not set the threshold too low, as the SMTP server may drop the connection if there are too many non-mail commands (like pinging the server with NOOP).

By default, the threshold is set to 100 seconds.

Parameters
$seconds : int

The minimum number of seconds between two messages required to ping the server

Return values
$this

setRestartThreshold()

Sets the maximum number of messages to send before re-starting the transport.

public setRestartThreshold(int $threshold[, int $sleep = 0 ]) : $this

By default, the threshold is set to 100 (and no sleep at restart).

Parameters
$threshold : int

The maximum number of messages (0 to disable)

$sleep : int = 0

The number of seconds to sleep between stopping and re-starting the transport

Return values
$this

setUsername()

public setUsername(string $username) : $this
Parameters
$username : string
Return values
$this

stringifyAddresses()

protected stringifyAddresses(array<string|int, Address$addresses) : array<string|int, string>
Parameters
$addresses : array<string|int, Address>
Return values
array<string|int, string>

assertResponseCode()

private assertResponseCode(string $response, array<string|int, mixed> $codes) : void
Parameters
$response : string
$codes : array<string|int, mixed>
Tags
throws
TransportException

if a response code is incorrect

callHeloCommand()

private callHeloCommand() : array<string|int, mixed>
Return values
array<string|int, mixed>

checkRestartThreshold()

private checkRestartThreshold() : void

doMailFromCommand()

private doMailFromCommand(string $address) : void
Parameters
$address : string

doRcptToCommand()

private doRcptToCommand(string $address) : void
Parameters
$address : string

getFullResponse()

private getFullResponse() : string
Return values
string

handleAuth()

private handleAuth(array<string|int, mixed> $modes) : void
Parameters
$modes : array<string|int, mixed>

        
On this page

Search results