Score:2

Is there a way to check which system was used to send mail?

jp flag

Is there a way to check which system was used to send mail?

I followed Sending html mails in Drupal 8/9 programmatically. I'm using the SMTP module to make sure that emails are sent via SMTP instead of using the PHP mailer. Emails sent via my website seem to have a higher spam score than when the ones sent directly from my SMTP server. I wonder whether my mails are being sent via SMTP or not.

Is there a method to check this?

Score:-1
ua flag

A way to check is using Gmail.

Sometimes it's obvious:

enter image description here

But most aren't, so you can click on the 3 dots and select show original

enter image description here

Here, for example, you can see this other one was sent using Zoho Mail's SMTP

enter image description here


By the way, I was also seeing emails sometimes land in the spam box using SMTP. Once I setup SPF, DKIM, and DMARC for my domain, I've never seen them land in spam again.

There are three main types of authentication used to prove to mailbox providers that your email is worth being placed in the inbox:

SPF (Sender Policy Framework) is an IP address-based authentication method used to compare the sender’s IP indicated in the domain’s DNS record with a list of IPs authorized to send from that domain.

DKIM (Domain Keys Identified Mail) is a method for validating domains through a publicly available cryptographic signature. This signature is verified on the receiving end using the DNS record.

DMARC (Domain-based Message Authentication, Reporting, and Conformance) is a protocol aimed at reducing email phishing and spoofing. It allows a sender to specify that their email is properly authenticated using DKIM and SPF records.

Senders who authenticate their messages with all three methods may see less filtering and fewer emails going to spam.

source: How to Prevent Emails from Going to Spam: The Ultimate Guide

Joost avatar
jp flag
Ah I see, showing the original shows me the following: Using PHPMailer 6.5.4 so I guess the SMTP module is not used. How can I force my code to use the SMTP module?
No Sssweat avatar
ua flag
@Joost install the [Mail System](https://www.drupal.org/project/mailsystem) module and in its configuration `/admin/config/system/mailsystem` for "sender" select SMTP.
Joost avatar
jp flag
I'm using mailsystem and just changed everything to SMTP. In the top it still says: `From: # Using PHPMailer 6.6.0 (https://github.com/PHPMailer/PHPMailer)` But in the code part you are mentioning it says: `Received: from # by mx.google.com with SMTP` So I think it works? Right? I tried sending via Google Workspace.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.