Queued Mail Sends But Not Always Recieved - Help Please
Hi All
I have a multitenant app that uses the Laravel Queue to send emails. All of our UK tenants seem to receive the emails (some end up in spam) but some EU customers using gmail or yahoo etc are not receiving the emails at all.
The from address is
Hi @s4muel thank you for your reply and advice. I may have to switch to the valid sender from email address.
I can confirm that the domains are valid from tenant->slugand tenant->tld. but some domains are hosted on other platforms such as hostsinger they've setup a subdomain such as portal.tenantdomain.com and have the IP for the subdomain pointed to the server where the app is hosted. Could this be causing an issue?
@ollie_123 yes, that definitely could be a problem, if you are trying to send an email on behalf of someone. they might have SPF/DKIM set up already, that basically tells the email providers who is designated sender. and if your server (which sends emails) is not in the list, the email ends up blocked (usually not even in spam folder).
for example laracasts is set up like this: https://mxtoolbox.com/SuperTool.aspx?action=spf%3alaracasts.com&run=toolpage which designates spf.messagingengine.com (mailspring service) to send emails., if you try to send email as [email protected], it violates this SPF rule and end up blocked and discarded (depending on the mail servers along the way, but very common)
The problem is most likely that there are no spf records that say your service is allowed to send on behalf of tenant domain.
If you look at the setup for something like mailchimp, one of the steps is to tell the customer how to add spf and dkim settings into their dns. You would need to do this also, or stop pretending that you are the domain mailserver.
Mail sending is getting increasingly strict and just saying mail is from noreply@tenantdomain is almost certain to result in your email identified as spam
Thanks @s4muel & @snapey. Im speaking with Hostinger who host the customers domain & subdomain and asked them to setup SPF & DKIM records and they're saying its an issue with me using SendMail and not SMTP but every other customer using the application doesn't have an issue with emails.
The Customer Service @ Hostinger said:-
"I was able to check the records of emails sent, and I couldn't find any records of emails sent via your server >with us, either via Sendmail, which uses the hosting server itself for sending, or via SMTP.
Even if there was some blocking going on, it would still be possible to check the internal logs, which are >currently empty for your server.
Even if you set up SPF and DKIM for the main domain or subdomain, it won't affect the current submissions at all >since they aren't reaching the Hostinger server for sending
That's why I'd recommend changing Sendmail to SMTP and following these steps to configure SMTP on your >Laravel."
Only with SMTP are we able to guarantee that messages are sent securely.
Hi @snapey the app is hosted on our webmin webserver and all the mail is sent from our server but the customers domain is hosted on hostinger with their MX records setup for gmail just to add more into the mix lol.