Take a look at their Email Acceptance Policy
So as it turns out, Iām not the only developer making a plugin dealing with email that would run into above issue of mail rejected or else
We tested another simple plugin and as well the mail wasnāt sent/received
So cf7 and others (major well known ācontactā form plugins) use some more advanced magic to make these things work on all cases
Iāll dig, find and solve, but that could take a while
If anyone has like insight in this (wp_mail with things like protonmail etc) and/or knows how to successfully send a mail in all possible cases Iām all ear
As it stands it seems my plugin isnāt compatible with at least proton mail service
Cf7 seems to just do
$headers = "From: $sender\n";
What Iāve seen some hosting providers do to reduce spam is require FROM email address to be from the sending domain. It doesnāt have to exist, just needs to be formatted with the domain.
For example, for domain.com the FROM address would need to be something like [email protected].
For clients that wanted to reply directly to the form submission email I had to add submitterās email as a reply-to email.
This is what Beda is currently doing.
I would suggest using CPās own SMTP plugin
and try some SMTP providers. I like Mailgun but there are other optionsā¦
Sendinblue SMTP
SendGrid SMTP
Gmail SMTP
Thereās no such thing.
My webhost only supports PHP mail function for PHP sites, and the program sendmail for other types of sites. They block SMTP connections, though I canāt say if that includes using an SMTP plugin.
Besides, Iām trying to keep my costs as low as possible, and using SMTP is not yet justified at this point.
Thereās also the fact that Iām trying to depend on third-party services (and their TOS) as little as possible. I write religious stuff, and at times that can be offensive to some people. I donāt want to wake up one day and find a service I depend on cut off because there are those who donāt like what I have to say.
This seems to be a common theme. I guess if you are going to be using a restrictive host then you need to work out solutions around that. Maybe forget the contact form and just put your email address on the contact page?
Yes, Iāve thought of just putting my email address, but only as a last resort. Users are more likely to send me messages if thereās already a contact form in place.
For now I have Fluentforms installed in my CP development site, and though I havenāt yet thoroughly tested its contact form, it does work in sending email notifications. (FF, however, has many features I donāt need, and so itād be nice to replace it with a dedicated contact form plugin.)
Itās the same with Contact Form 7, which I used when I was still building my site using WP, before I switched to CP. Despite my restrictive webhost, CF7 does work very well. (But as you might know, CF7 no longer supports WP 4.9.)
Anyway, I was thinking that itās a good thing Iām testing this plugin by beda in my restrictive webhost. If he can get it to work in my environment, then itās a strong guarantee that itāll work in most other, less-paranoid webhosts
@anon66243189 I finally got your Contact Form plugin working, and the problem is not with the plugin itself, but with my webhost. Or rather, the plugin did not work before because I had to do something first, and that is, to tell my webhost (through an SPF DNS record) that Iām allowing emails to be sent from my registered domain through my webhostās email server. I didnāt do this before, and so the emails produced by your plugin was dropped before they could be sent.
This is the SPF record I added to my DNS:
v=spf1 include:sites.nearlyfreespeech.net ~all
And so, in my web environment, because your Contact Form sends email using the blogās email address as the sender, it requires two conditions (at least if using PHP to send mail):
- The blog email address must use a custom domain (a Gmail account wonāt do).
- The domain must have an SPF record telling the world that itās being used for email, including what servers are āauthorizedā to send those emails.
My domain is registered in my webhost, and my DNS is managed there. Perhaps this will work too even if the domain is registered and managed elsewhere, as long as that SPF record is in place.