|
@@ -76,7 +76,7 @@ class MailCaptcha extends BaseService
|
|
|
//dd(config('smtp'));
|
|
|
try {
|
|
|
//Server settings
|
|
|
- $mail->SMTPDebug = SMTP::DEBUG_OFF;//DEBUG_OFF,DEBUG_SERVER //Enable verbose debug output
|
|
|
+ $mail->SMTPDebug = SMTP::DEBUG_SERVER;//DEBUG_OFF,DEBUG_SERVER //Enable verbose debug output
|
|
|
$mail->SMTPOptions = array(
|
|
|
'ssl' => array(
|
|
|
'verify_peer' => false,
|
|
@@ -84,16 +84,26 @@ class MailCaptcha extends BaseService
|
|
|
'allow_self_signed' => true
|
|
|
)
|
|
|
);
|
|
|
- $mail->isSMTP(); //Send using SMTP
|
|
|
+/* $mail->isSMTP(); //Send using SMTP
|
|
|
$mail->Host = config('smtp.host'); //Set the SMTP server to send through
|
|
|
$mail->SMTPAuth = true; //Enable SMTP authentication
|
|
|
$mail->Username = config('smtp.username'); //SMTP username
|
|
|
$mail->Password = config('smtp.password'); //SMTP password
|
|
|
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
|
|
|
- $mail->Port = config('smtp.port'); //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
|
|
|
+ $mail->Port = config('smtp.port'); */ //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
|
|
|
|
|
|
//Recipients
|
|
|
- $mail->setFrom(config('smtp.from_address'), config('smtp.from_name'));
|
|
|
+ //$mail->setFrom(config('smtp.from_address'), config('smtp.from_name'));
|
|
|
+
|
|
|
+ $mail->isSMTP(); //Send using SMTP
|
|
|
+ $mail->Host = 'tls://smtp.office365.com';//config('smtp.host'); //Set the SMTP server to send through
|
|
|
+ $mail->SMTPAuth = true; //Enable SMTP authentication
|
|
|
+ $mail->Username = 'register@freeshippingvapes.com';//config('smtp.username'); //SMTP username
|
|
|
+ $mail->Password = 'Iloveyou1@#';//config('smtp.password'); //SMTP password
|
|
|
+ $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable implicit TLS encryption
|
|
|
+ $mail->Port = 587;//;config('smtp.port');
|
|
|
+ $mail->setFrom('register@freeshippingvapes.com', 'Free Shipping Vps');
|
|
|
+
|
|
|
$mail->addAddress($email, 'FSV'); //Add a recipient
|
|
|
//$mail->addAddress('ellen@example.com'); //Name is optional
|
|
|
//$mail->addReplyTo('info@example.com', 'Information');
|
|
@@ -108,7 +118,7 @@ class MailCaptcha extends BaseService
|
|
|
//$mail->isHTML(true); //Set email format to HTML
|
|
|
$mail->Subject = 'Password';
|
|
|
$mail->Body = 'Your code is ' . $smsCaptcha . '.Please use it in 15 minutes';
|
|
|
- $mail->AltBody = 'This is the Your Code for Free Shipping Vapes';
|
|
|
+ $mail->AltBody = 'This is the Your Code for FreeShippingV';
|
|
|
|
|
|
$mail->send();
|
|
|
//echo 'Message has been sent';
|
|
@@ -150,7 +160,7 @@ class MailCaptcha extends BaseService
|
|
|
$mail->SMTPAuth = true; //Enable SMTP authentication
|
|
|
$mail->Username = config('smtp.username'); //SMTP username
|
|
|
$mail->Password = config('smtp.password');
|
|
|
- $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
|
|
|
+ $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable implicit TLS encryption
|
|
|
$mail->Port = config('smtp.port'); //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
|
|
|
|
|
|
//Recipients
|
|
@@ -232,4 +242,4 @@ class MailCaptcha extends BaseService
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
-}
|
|
|
+}
|