How to correct set SSL mail encryption in Laravel?












0















I'm trying to configurate email in my Laravel project. Trying to set SSL encryption but it doesn't work. There are no errors or warnings. All mails are going to Spam.



SSL/TLS Configuration



Username:   info@example.com
Password: ***.
Incoming Server: example.com
IMAP Port: *** POP3 Port: ***
Outgoing Server: example.com
SMTP Port: 465


My configuration in .env



MAIL_DRIVER=mail // tried to use smtp
MAIL_HOST=example.com
MAIL_PORT=465 // 587 for NON SSL works ok
MAIL_USERNAME=info@example.com
MAIL_PASSWORD=***
MAIL_ENCRYPTION=tls // tried to set SSL, NULL with 587 port works fine


In config/mail.php added



'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],









share|improve this question


















  • 2





    Please refer to this answer. stackoverflow.com/a/45751452/6375399

    – dvl333
    Nov 22 '18 at 12:15













  • I checked it. The funny thing is that default laravel's password reset mail goes to inbox. And my mails goes to spam.

    – qqmydarling
    Nov 22 '18 at 12:42











  • Have you looked to see if any of your content / subject of the email have spam words. Could you post the email view?

    – James Waring
    Nov 23 '18 at 10:03
















0















I'm trying to configurate email in my Laravel project. Trying to set SSL encryption but it doesn't work. There are no errors or warnings. All mails are going to Spam.



SSL/TLS Configuration



Username:   info@example.com
Password: ***.
Incoming Server: example.com
IMAP Port: *** POP3 Port: ***
Outgoing Server: example.com
SMTP Port: 465


My configuration in .env



MAIL_DRIVER=mail // tried to use smtp
MAIL_HOST=example.com
MAIL_PORT=465 // 587 for NON SSL works ok
MAIL_USERNAME=info@example.com
MAIL_PASSWORD=***
MAIL_ENCRYPTION=tls // tried to set SSL, NULL with 587 port works fine


In config/mail.php added



'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],









share|improve this question


















  • 2





    Please refer to this answer. stackoverflow.com/a/45751452/6375399

    – dvl333
    Nov 22 '18 at 12:15













  • I checked it. The funny thing is that default laravel's password reset mail goes to inbox. And my mails goes to spam.

    – qqmydarling
    Nov 22 '18 at 12:42











  • Have you looked to see if any of your content / subject of the email have spam words. Could you post the email view?

    – James Waring
    Nov 23 '18 at 10:03














0












0








0








I'm trying to configurate email in my Laravel project. Trying to set SSL encryption but it doesn't work. There are no errors or warnings. All mails are going to Spam.



SSL/TLS Configuration



Username:   info@example.com
Password: ***.
Incoming Server: example.com
IMAP Port: *** POP3 Port: ***
Outgoing Server: example.com
SMTP Port: 465


My configuration in .env



MAIL_DRIVER=mail // tried to use smtp
MAIL_HOST=example.com
MAIL_PORT=465 // 587 for NON SSL works ok
MAIL_USERNAME=info@example.com
MAIL_PASSWORD=***
MAIL_ENCRYPTION=tls // tried to set SSL, NULL with 587 port works fine


In config/mail.php added



'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],









share|improve this question














I'm trying to configurate email in my Laravel project. Trying to set SSL encryption but it doesn't work. There are no errors or warnings. All mails are going to Spam.



SSL/TLS Configuration



Username:   info@example.com
Password: ***.
Incoming Server: example.com
IMAP Port: *** POP3 Port: ***
Outgoing Server: example.com
SMTP Port: 465


My configuration in .env



MAIL_DRIVER=mail // tried to use smtp
MAIL_HOST=example.com
MAIL_PORT=465 // 587 for NON SSL works ok
MAIL_USERNAME=info@example.com
MAIL_PASSWORD=***
MAIL_ENCRYPTION=tls // tried to set SSL, NULL with 587 port works fine


In config/mail.php added



'stream' => [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
],
],






laravel email smtp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 '18 at 11:19









qqmydarlingqqmydarling

58112




58112








  • 2





    Please refer to this answer. stackoverflow.com/a/45751452/6375399

    – dvl333
    Nov 22 '18 at 12:15













  • I checked it. The funny thing is that default laravel's password reset mail goes to inbox. And my mails goes to spam.

    – qqmydarling
    Nov 22 '18 at 12:42











  • Have you looked to see if any of your content / subject of the email have spam words. Could you post the email view?

    – James Waring
    Nov 23 '18 at 10:03














  • 2





    Please refer to this answer. stackoverflow.com/a/45751452/6375399

    – dvl333
    Nov 22 '18 at 12:15













  • I checked it. The funny thing is that default laravel's password reset mail goes to inbox. And my mails goes to spam.

    – qqmydarling
    Nov 22 '18 at 12:42











  • Have you looked to see if any of your content / subject of the email have spam words. Could you post the email view?

    – James Waring
    Nov 23 '18 at 10:03








2




2





Please refer to this answer. stackoverflow.com/a/45751452/6375399

– dvl333
Nov 22 '18 at 12:15







Please refer to this answer. stackoverflow.com/a/45751452/6375399

– dvl333
Nov 22 '18 at 12:15















I checked it. The funny thing is that default laravel's password reset mail goes to inbox. And my mails goes to spam.

– qqmydarling
Nov 22 '18 at 12:42





I checked it. The funny thing is that default laravel's password reset mail goes to inbox. And my mails goes to spam.

– qqmydarling
Nov 22 '18 at 12:42













Have you looked to see if any of your content / subject of the email have spam words. Could you post the email view?

– James Waring
Nov 23 '18 at 10:03





Have you looked to see if any of your content / subject of the email have spam words. Could you post the email view?

– James Waring
Nov 23 '18 at 10:03












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53429808%2fhow-to-correct-set-ssl-mail-encryption-in-laravel%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53429808%2fhow-to-correct-set-ssl-mail-encryption-in-laravel%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

Npm cannot find a required file even through it is in the searched directory