Issue when sending an email? - laravel

I did a lot of research through internet but I didn't found the solution. I'm trying to send a confirmation email using Mail::send() in laravel 5.1, I don't want to use any third party like mailgun or mandrill because they are not free sometimes limited of usage. The problem with this is all of the confirmation of the users is in their spam folder in gmail, and trash folder in outlook. Sometimes they didn't receive the confirmation. Why is that? Do you have any idea with this? My website is also registered to https so I don't think this is the problem.
.env
MAIL_DRIVER=smtp
MAIL_HOST=mail.mywebsite.com
MAIL_PORT=587
MAIL_USERNAME=email#mywebsite.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls

Landing of an email into Spam is nothing to do with Laravel.
Either you have to change the TXT record of your domain.
You can check it on mail-tester which values need to be changed.
https://www.mail-tester.com/

You might wanna try testing at Mail Tester. This can reveal a lot of information on why your emails are ending up in spam. I also recommend checking SPF and DKIM checking at SPF & DKIM checking at the same site.
Also are you hosting your emails with your hosting provider or some other third-parties like GSuite or Microsoft Exchange? These providers can influence the mail quality and spam checking greatly.

The spam classification of emails is to the discretion of the receiving mail server. There are a couple of best pratices to follow, when trying to avoid being marked as spam:
Make sure the sending server (smtp server) is allowed through
SPF
DKIM
DMARC
MX records
Further, the recipient server may check for bulk content with decentralized solutions like razor, pyzor or DCC. So, try to personalize the messages and not send bulk content. Its hard to evaluate your situation without specifics. Another problem may be the sending webserver if its in or from a country with "bad reputation" (like Russia, China). Since mail server also check the Original-IP of the email and potentially flag them as well.
SPF:
https://mxtoolbox.com/SPFRecordGenerator.aspx
DKIM:
https://dkimcore.org/tools/keys.html
DMARC:
https://mxtoolbox.com/DMARCRecordGenerator.aspx
To check your settings, it helps to use mail testing solutions visualizing those mentioned factors as mentioned by other answers.

Current email deliverability professional here. If you are willing to share the domain you are sending from, and the IP address initiating the sends I'm happy to check for any obvious problems.
I also heartily recommend mail-tester.com as I use it almost daily. If you want to share the link to the report I'm happy to help interpret.
The other thing to be aware of is, that IP addresses have a sender reputation that is tracked in the Email ecosystem at large. If it's a new sending IP address it has to get warmed up. Just like you cannot get a credit card with no limit as soon as you turn 21, Inbox Providers like Gmail and Hotmail are not just going to deliver everything a new sending IP starts trying to deliver to their recipients. They will essentially do some A/B testing by delivering some to the Inbox and some to the Spam/Promotions folder, and see how their recipients interact with your mailings. Gmail and thus other inbox providers are primarily concerned with how recipients interact with your mailings. Do they open, do they click links, do they add you to safe senders, etc.
-LB

Related

Our domain was involved in sending spam email now no email is going to inbox

Couple of days back someone used our domain to send spam emails, Now we are using mailgun to send emails but none of email is going to inbox, because previously it was involved in spam activity, how we can now prevent this issue that our email should land to the inbox folder right away! We have other domains to for the purpose of sending emails we can use those too!
It's a matter of notoriety of domain and IP address.
If you use another domain on the same server (ip address), it will end up in the spam folder too.
Using a mail relay like mailgun, and especialy with a dedicated IP option, will help over time to get out of the spam folder if not right away.
You can also help fix your issue by asking some of your users to mark your emails as "not a spam".
No other quicker solutions.

Email goes to spam folder Gmail and outlook while having 10 in mail-tester

I put a lot of effort in perfectionizing my emails in Magento, in mail-tester i even have a 10. But stil the emails (also when i send a not transactional mail) go to spam in gmail and outlook.
Any idea why?
Email deliverability involves a lot of factors so more information is needed to help you. What are all the services you use to send email out other than Magento? Do you do email marketing? Do you get good engagement with your email marketing (opens. clicks) with low bounces? What's the nature of your business and the content you send in the Magento emails and other emails you send out (e.g., marketing emails) even if through other services?
What precisely is in your Sender Policy Framework Record (SPF) record (please post exactly what's in your SPF record for sending domain)? Do you have DKIM implemented with services that send mail on your behalf? Have you implemented DMARC?
Do you send email from a dedicated or shared IP address(s)? Check hosts and IP address for blacklists at mxtoolbox and check your senderscore at senderscore.org.
Do you know if the problem is limited to Magento or do other emails sent from that domain go to spam as well? You may want to set up a test account or two with gmail and outlook.com as it will be handy to have some email addresses to send to that you've never sent to before for testing purposes.
Note: I tried to post this as a comment but it was too many characters.

Magento Newsletters take over 24 hours to send

I have a little under 7000 newsletter subscribers. I run an online shop and would like to send out daily newsletters for my Deal Of The Day. This is currently impossible as it takes at least an entire day for my newsletter to get to all of its subscribers. Please advise
Please use some email marketing solution to send emails.
Choose from list below:
1. Mailchimp (easiest of all)
2. Netcore (provides full solution)
3. Icubes
4. Sendy.co (cheapest of all)
Using these you will also be able to track your email response like opens, clicks etc.
You can hack Magento to send more emails; however, your web hosting provider will probably pull your plug unless they specifically allow mass Commercial Email.
You will be black listed as a spammer if you don't understand how to set up domain keys, SPF and a series of other items. One of the biggies is that you shouldn't be using port 25 unencrypted traffic without authentication. Any bypassing of this changes your bulk email output to UCE (Unsolicited Commercial Email) in their books. The other biggie is not having an unsubscribe method present in every email sent.
If you have the technical capacity to be running your own web server (not have to use a hosting provider) then Amazon's SMS is probably a good choice if you have Ashley Shroeder's SMTP module installed.
If you don't have the technical capability, then using an ESP (eMail Service Provider) like MailChimp is a far better way. They take care of a lot of the technical detail with bounces, email list management, unsubscribe, etc. to help prevent you from being blacklisted as a UCE source.

Magento - New Order mail not getting triggered to specific domain

Recently i deployed Magento store And made some test order,
where following observation i made on Transactional Emails.
New Order email is triggered to my gmail account, if i use account associated with it.
but when i used another account to make purchase, that order is placed but New order mail is not being triggered to that email.
Based on above observation i am afraid that theirs possibility that emails might not get delivered to some others emails also.
Now, I am looking for some solution that will solve this or possibility is that i might have missed some configuration.
please help
You can use SMTP Pro Email, which is an extension that allows Magento to send all its automatic emails, from any e-mail service you want, even your gmail account for example. With this solution, you can try several e-mail server/services and finally pick the one that is not blocked or flagged as SPAM.

How do I verify an email address is real and in use using the Sender Policy Framework

From what I've been reading the SPF can be used to validate email addresses by sending commands (rather than an actual email) such as HELO. I've managed to pick up a basic grasp of the policy but I can't get my head around how I'd go about solving the following problem:
I've got a number of email addresses attached to contacts in a CRM system and I'd like to find out if the email addresses are valid and still in use.
Currently we're using a REST Web Service (http://emailinspector.co.uk/) which returns "Ok" (if its ok... duh), "Bad" (if its not valid or not in use) or "Unknown". For Unknown, you are also provided some notes on why it came back with that, i.e. you are told if the Mailbox is full or if its a well known DEA.
I'd like to be able to program a script that can replicate this functionality and from what I've worked out it should use the Sender Policy Framework to do this? The problem is I don't know how I'd go about returning such precise information for "Unknown" email addresses.
Ideas and thoughts?
Actually SPF is just a text record, with some "hints" to let you know if an IP address or mail server is "allowed/Authorized" to send email for that domain. It doesn't tell you anything about an individual email address in that domain..
for example
[doon#qix:~] host -t txt labratsoftware.com
labratsoftware.com descriptive text "v=spf1 a -all"
The SPF record for one of my domains says that only the a record for the domain is authorized to send email for labratsoftware.com, and that if it doesn't come from that IP then it should be rejected (-all).
So the best you can do with SPF is tell that a received email came from an authorized host, and then use that information to help decide if you want to reject it or not.
The best way To test the validity of an email address you have, is to email it, and see if it bounces. You can use options like VERP (http://en.wikipedia.org/wiki/Variable_envelope_return_path) to automate the bounce handling. You can also try and connect to the MX records listed for the domain and try to deliver a message that way. Some Mail servers support verify (But most admins disable this to prevent information leakage). You can use RCPT TO to see if the server accepts it, but even if it does , you have no way of knowing if it will actually make it to their INBOX. My guess is that is what the API you are currently using is doing. And unknown are just ones that either don't answer, greylist, etc.

Resources