php-swiftmailerHow to check Swiftmailer version?
To check the version of Swiftmailer, you can use the following code:
$swiftmailerVersion = \Swift_DependencyContainer::getInstance()->lookup('transport.version');
echo $swiftmailerVersion;
This will output the version of Swiftmailer, for example: 6.2.3
.
The code consists of two parts:
\Swift_DependencyContainer::getInstance()->lookup('transport.version')
- This part looks up the version of the transport layer of Swiftmailer.echo $swiftmailerVersion
- This part prints out the version of Swiftmailer.
Helpful links
More of Php Swiftmailer
- How to set timeout with Swiftmailer?
- How to use SMTP with Swiftmailer?
- How to use TLS 1.2 with Swiftmailer?
- How to get the response code when using Swiftmailer?
- How to use Swiftmailer to send RFC 2822 compliant emails?
- How to configure Swiftmailer for Postfix?
- How to send emails in UTF8 using Swiftmailer?
- How to send emails to multiple recipients with Swiftmailer?
- How to set the port for Swiftmailer?
- How to enable TLS with Swiftmailer?
See more codes...