PHP code example of duncan3dc / swiftmailer
1. Go to this page and download the library: Download duncan3dc/swiftmailer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
duncan3dc / swiftmailer example snippets
(new \duncan3dc\Mailer\Server)
->createMessage()
->withFromAddress("[email protected]", "Administrator")
->withRecipient("[email protected]", "Your Name")
->withSubject("Test Email")
->withContent("Hello")
->withAttachment("/tmp/UGqucq", "sensible-filename.xls")
->send();