private function sendMail()
 {
     $mailTransport = new MailTransport('mail');
     $mail = new Mail($mailTransport->conf());
     $mail->setSubject('Registration successful')->setFrom($mail->getAdminEmail())->setTo($this->email)->setBody("Welcome {$this->login} on {$this->view->getSiteTitle()}.\n" . "Thank you for registering at our site. You can find your credentials below:\n" . "Login: {$this->login}\nPassword: {$this->password}\nEmail: {$this->email}");
     $mail->send();
 }
Esempio n. 2
0
 /**
  *
  * @param Command $command
  */
 private function sendMail(Command $command)
 {
     $login = $command->entity()->getLogin();
     $transport = new MailTransport('mail');
     $mail = new Mail($transport->conf());
     $mail->setSubject('Remind password')->setFrom($mail->getAdminEmail())->setTo($this->http->request->get('userEmail'))->setBody("Dear {$login}\n" . "Your new password is: {$this->randomPassword}\n" . "You can change it later in your user account.");
     $mail->send();
 }
Esempio n. 3
0
 public function testGetAdminEmail()
 {
     $this->assertEquals('*****@*****.**', $this->mail->getAdminEmail());
 }
Esempio n. 4
0
File: index.php Progetto: Rayac/mail
<?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'));