PHP code example of ukorjidechi / send_mail

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

    

ukorjidechi / send_mail example snippets





    
    $sender_email_addr = "[email protected]";
    $sender_name = "Sender Name";
    $recipient_email_addr = "[email protected]";
    $recipient_name = "Recipient Name";
    $subject = "Email Subject";
    $html_message = "<h2>This is the HTML part of the email message</h2>";
    $plain_message = "This is the plain part of the email message";
    
    (new \ukorJidechi\mail\send_mail(
                                     $sender_email_addr, $sender_name, 
                                     $recipient_email_addr, $recipient_name, 
                                     $subject, $html_message, $plain_message
                                     ));
}catch(Exception $exception)
{
    echo $exception->getMessage() ."<br><br>". $exception->getCode(). "<br><br>".$exception->getTraceAsString();
}
 send_mail.php