PHP code example of shadiakiki1986 / swiftmailer-wrapper

1. Go to this page and download the library: Download shadiakiki1986/swiftmailer-wrapper 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/ */

    

shadiakiki1986 / swiftmailer-wrapper example snippets




\SwiftmailerWrapper\Utils::mail_attachment(

  // attachments
  array("/path/to/file1","/path/to/file2"),

  // to, from, reply emails
  "[email protected]",
  "[email protected]",
  "From Name",
  "[email protected]",

  // subject, body
  "This is a subject",
  "This is a message. It <i>supports</i> html.",

  // config array
  array(
    "host"=>"smtp.server.com",
    "port"=>"123",
    "username"=>"myUser",
    "password"=>"pizza"
  )

);

  array("newName1"=>"/path/to/file1","newName2"=>"/path/to/file2"),