Skip to content

Instantly share code, notes, and snippets.

@petk
Created June 26, 2015 12:27
Show Gist options
  • Save petk/ffca0f865303996b39f8 to your computer and use it in GitHub Desktop.
Save petk/ffca0f865303996b39f8 to your computer and use it in GitHub Desktop.
Using PHPMailer
<?php
require __DIR__ . '/vendor/autoload.php';
use PHPWorldWide\Mailer;
$test = new Mailer();
{
"require": {
"phpmailer/phpmailer": "^5.2"
},
"autoload": {
"psr-4": {"PHPWorldWide\\": "src/"}
}
}
<?php
// this file is inside src folder
namespace PHPWorldWide;
use PHPMailer;
class Mailer
{
public function __construct()
{
$mailer = new PHPMailer();
var_dump($mailer->Version);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment