api/symfony/Component/Mailer/Transport/Smtp/SmtpTransport.yaml

247 lines
7 KiB
YAML
Raw Permalink Normal View History

2024-09-26 09:03:21 +00:00
name: SmtpTransport
class_comment: '# * Sends emails over SMTP.
# *
# * @author Fabien Potencier <fabien@symfony.com>
# * @author Chris Corbyn'
dependencies:
- name: EventDispatcherInterface
type: class
source: Psr\EventDispatcher\EventDispatcherInterface
- name: LoggerInterface
type: class
source: Psr\Log\LoggerInterface
- name: Envelope
type: class
source: Symfony\Component\Mailer\Envelope
- name: LogicException
type: class
source: Symfony\Component\Mailer\Exception\LogicException
- name: TransportException
type: class
source: Symfony\Component\Mailer\Exception\TransportException
- name: TransportExceptionInterface
type: class
source: Symfony\Component\Mailer\Exception\TransportExceptionInterface
- name: UnexpectedResponseException
type: class
source: Symfony\Component\Mailer\Exception\UnexpectedResponseException
- name: SentMessage
type: class
source: Symfony\Component\Mailer\SentMessage
- name: AbstractTransport
type: class
source: Symfony\Component\Mailer\Transport\AbstractTransport
- name: AbstractStream
type: class
source: Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream
- name: SocketStream
type: class
source: Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream
- name: RawMessage
type: class
source: Symfony\Component\Mime\RawMessage
properties: []
methods:
- name: setRestartThreshold
visibility: public
parameters:
- name: threshold
- name: sleep
default: '0'
comment: "# * Sends emails over SMTP.\n# *\n# * @author Fabien Potencier <fabien@symfony.com>\n\
# * @author Chris Corbyn\n# */\n# class SmtpTransport extends AbstractTransport\n\
# {\n# private bool $started = false;\n# private int $restartThreshold = 100;\n\
# private int $restartThresholdSleep = 0;\n# private int $restartCounter = 0;\n\
# private int $pingThreshold = 100;\n# private float $lastMessageTime = 0;\n#\
\ private AbstractStream $stream;\n# private string $domain = '[127.0.0.1]';\n\
# \n# public function __construct(?AbstractStream $stream = null, ?EventDispatcherInterface\
\ $dispatcher = null, ?LoggerInterface $logger = null)\n# {\n# parent::__construct($dispatcher,\
\ $logger);\n# \n# $this->stream = $stream ?? new SocketStream();\n# }\n# \n#\
\ public function getStream(): AbstractStream\n# {\n# return $this->stream;\n\
# }\n# \n# /**\n# * Sets the maximum number of messages to send before re-starting\
\ the transport.\n# *\n# * By default, the threshold is set to 100 (and no sleep\
\ at restart).\n# *\n# * @param int $threshold The maximum number of messages\
\ (0 to disable)\n# * @param int $sleep The number of seconds to sleep between\
\ stopping and re-starting the transport\n# *\n# * @return $this"
- name: setPingThreshold
visibility: public
parameters:
- name: seconds
comment: '# * Sets the minimum number of seconds required between two messages,
before the server is pinged.
# * 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.
# *
# * @param int $seconds The minimum number of seconds between two messages required
to ping the server
# *
# * @return $this'
- name: setLocalDomain
visibility: public
parameters:
- name: domain
comment: '# * Sets the name of the local domain that will be used in HELO.
# *
# * 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.
# *
# * @return $this'
- name: getLocalDomain
visibility: public
parameters: []
comment: '# * Gets the name of the domain that will be used in HELO.
# *
# * If an IP address was specified, this will be returned wrapped in square
# * brackets as described in RFC 5321, section 4.1.3.'
- name: send
visibility: public
parameters:
- name: message
- name: envelope
default: 'null'
comment: null
- name: parseMessageId
visibility: protected
parameters:
- name: mtaResult
comment: null
- name: __toString
visibility: public
parameters: []
comment: null
- name: executeCommand
visibility: public
parameters:
- name: command
- name: codes
comment: '# * Runs a command against the stream, expecting the given response codes.
# *
# * @param int[] $codes
# *
# * @throws TransportException when an invalid response if received'
- name: doSend
visibility: protected
parameters:
- name: message
comment: null
- name: doHeloCommand
visibility: private
parameters: []
comment: null
- name: doMailFromCommand
visibility: private
parameters:
- name: address
comment: null
- name: doRcptToCommand
visibility: private
parameters:
- name: address
comment: null
- name: start
visibility: public
parameters: []
comment: null
- name: stop
visibility: public
parameters: []
comment: '# * Manually disconnect from the SMTP server.
# *
# * In most cases this is not necessary since the disconnect happens automatically
on termination.
# * In cases of long-running scripts, this might however make sense to avoid keeping
an open
# * connection to the SMTP server in between sending emails.'
- name: ping
visibility: private
parameters: []
comment: null
- name: assertResponseCode
visibility: private
parameters:
- name: response
- name: codes
comment: '# * @throws TransportException if a response code is incorrect'
- name: getFullResponse
visibility: private
parameters: []
comment: null
- name: checkRestartThreshold
visibility: private
parameters: []
comment: null
- name: __sleep
visibility: public
parameters: []
comment: null
- name: __wakeup
visibility: public
parameters: []
comment: null
- name: __destruct
visibility: public
parameters: []
comment: null
traits:
- Psr\EventDispatcher\EventDispatcherInterface
- Psr\Log\LoggerInterface
- Symfony\Component\Mailer\Envelope
- Symfony\Component\Mailer\Exception\LogicException
- Symfony\Component\Mailer\Exception\TransportException
- Symfony\Component\Mailer\Exception\TransportExceptionInterface
- Symfony\Component\Mailer\Exception\UnexpectedResponseException
- Symfony\Component\Mailer\SentMessage
- Symfony\Component\Mailer\Transport\AbstractTransport
- Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream
- Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream
- Symfony\Component\Mime\RawMessage
interfaces: []