Beispiel #1
0
<?php

use Mail\Mail;
require '../vendor/autoload.php';
$loader = new Twig_Loader_Filesystem('../views/twig');
$twig = new Twig_Environment($loader, array('cache' => false));
$mail = new Mail();
if (isset($_POST['from'])) {
    $mail->writeMail($_POST);
    $mail->sendMail();
}
echo $twig->render("form.twig");
use Mailgun\Mailgun;
# Instantiate the client.
$mgClient = new Mailgun('key-3c246e362731a7f0458f67ea00e31479');
# Issue the call to the client.
$result = $mgClient->post("routes", array('priority' => 0, 'expression' => 'match_recipient(".*@sandboxbcb41bc62f6d485e9e43ef8edb592f7b.mailgun.org")', 'action' => array('forward("*****@*****.**")', 'stop()'), 'description' => 'Sample route'));