PHP code example of edywladson / sendmail

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

    

edywladson / sendmail example snippets




dyWladson\SendMail\SendMail;

//Config
$sendmail = new SendMail(
    "Host",
    "Port",
    "User",
    "Pass",
    "Lang", //default "en"
    "Secure", //default "tls"
    "Charset", //default "utf-8"
    "Html", //default "true"
    "Auth", //defautl "true"
);

//Mail Data
$sendmail->mail(
    "Subject",
    "Body",
    "Recipient Mail",
    "Recipient Name"
);

//Test and Result
if (!$sendmail->send("From Mail", "From Name")){
    echo $sendmail->message();
}else{
    echo "Email successfully sent!";
}