final commit

This commit is contained in:
Sada Shiva
2016-02-04 13:42:21 +05:30
parent 11f4b086b7
commit 1c343ea3bf
169 changed files with 20476 additions and 192 deletions

View File

@@ -17,6 +17,8 @@ use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Mail;
use Auth;
use Exception;
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
include_once($root.'\faveo-comm\vendor\phpmailer\phpmailer\PHPMailerautoload.php');
/**
* ---------------------------------------------------
@@ -103,7 +105,40 @@ class AuthController extends Controller {
});
return redirect('home')->with('success', 'Activate Your Account ! Click on Link that send to your mail');
}
public function sendmail() {
$mail = new \PHPMailer;
//$mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'sujitprasad4567@gmail.com'; // SMTP username
$mail->Password = 'pankajprasad22.'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom('sujitprasad4567@gmail.com', 'Mailer');
$mail->addAddress('sada059@gmail.com', 'Joe User'); // Add a recipient
// Name is optional
$mail->addReplyTo('sada059@gmail.com', 'Information');
// Optional name
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
}
/**
* Get mail function
* @param type $token