FreewayTalk

3 replies to this thread. Most Recent

David Owen

2 Jul 2019, 4:27 pm

Freeway php send form email not reaching Dreamhost mailbox

This is an odd one…

I have a Freeway reply form using the php “Send Form” action site on a server. Works fine to send emails to all the test mailboxes to users on other mail services all but the client’s mailbox hosted on Dreamhost it fails to get there at all.

From what I can tell the suggestions are because the Freeway’s php form is not using SMTP to connect to a mail server to send and Dreamhost is maybe marking it as spam as a result.

Anyone head of this problem before?

How could I add SMTP details to the script?

David Owen http://www.davidowendesign.com

www.ineedwebhosting.co.uk

Freeway Friendly Web Hosting, Domain Names, VPS and Dedicated Servers. (Create an account it’s Free!)


PrintlineAdvertising.co.uk

Print Design, Digital and Litho Printers, Promotional Merchandise and Corporate Gifts.

Matt Covarr

15 Jul 2019, 1:53 pm

Hi David,

I cannot seem to find a solution to this, but I have exactly the same problem. Certain mailboxes with certain hosts are not a problem, while others simply never get the email at all.

If anyone has a solution to this, it would be great to know.

Matt Covarr

Matt Covarr

www.covarrdesign.com

Plettenberg Bay

Western Cape

South Africa

waltd

15 Jul 2019, 4:22 pm

This script uses the built-in SMPT service in PHP, which is exposed in the mail() method. That service, in turn, delegates to whatever SMTP service (usually sendmail or a look-alike) is installed on the Web server hosting the page. Depending on how your Web server is set up, it may be trusted as a mail host for your domain, or (more likely) it is not. This is ever-more-complicated these days, as SPAM has been weaponized and an arms race between spammers and major mail hosts like Outlook and Gmail have made it more complex to configure, such that hopefully only valid, real mail gets through.

If you have followed the directions for this Action, one of its fun and friendly features is to set the mail messages that it sends as if they are from the person filling in the form. This is a very old trick, hailing back to the time when every shared server had a copy of formmail.pl installed in its CGI-BIN (ask your parents). Given the way that the net has responded to all the fake mail emitting from every copy of Windows, or set-top-box, or “smart” light bulb out there, this trick does not generally work. It will work, in the technical sense that the mail will be properly formatted and deliverable, but it generally won’t get anywhere that has to go through one of the big mail hosting providers, because of the fact that YOUR server is almost without exception not authorized to send mail on behalf of a gmail.com address. The messages you send from your web server must all be from an address in ITS domain.

So the first thing you must do is to turn off that friendly feature, send the e-mail FROM an address in your domain. A real address that really works. Some spam filters test this by sending a HEAD request to your mail server, asking if this account exists. So if your hosting provider lets you set up mail addresses in your domain (most do) you can set up a mailbox like [email protected] and give it an auto-reply message for all those who don’t read, and an auto-delete so your server doesn’t fill up with SPAM. Then configure the Action to send the e-mail address of the sender as a normal form element. It will be listed in the body of the message alongside all of the other details you added to the form. It’s not quite as friendly as being able to hit “Reply” and send a reply — you have to click on the e-mail address (which will probably open a new message in your mail application) and compose the message manually — but it means that more people will get your message.

Next, there are two basic things you must have configured in your DNS (Domain Name Service) records in order to allow your Web server to send mail on behalf of your domain. The first is a proper MX (Mail eXchange) host record for your Web server. Your domain may declare as many different hosts (individual machines in your domain) as mail servers. Each of them will have a different priority setting, so that the lowest number is the first place to try to deliver mail, followed by the next higher number, and so on. These must all be in YOUR domain — you can’t use an MX record to say that mail.example.com is authorized to send mail for you. The second is a TXT record, with the SPF (Server Protection Framework, I think) property set to designate which out-of-domain servers are allowed to act as an MX. Your hosting provider (especially if they also host your DNS for you) are in the best position to set this up for you, so start with a support ticket to them.

I’ll end with a joke. Do you want to know what the real, actual meaning of SMTP is? Simple Mail Transport Protocol. To the wizards that invented the Internet, it really did seem to be simple.

Walter

On Jul 15, 2019, at 9:53 AM, Matt Covarr <[email protected]> wrote:

Hi David,

I cannot seem to find a solution to this, but I have exactly the same problem. Certain mailboxes with certain hosts are not a problem, while others simply never get the email at all.

If anyone has a solution to this, it would be great to know.

Matt Covarr

Freeway user since 1997

http://www.walterdavisstudio.com

Back to Top

waltd

15 Jul 2019, 10:36 pm

If you’re looking at this on the web, you’ll see [email protected] above, because our anti-SPAM defenses thought I was trying to add a crawl-able address to the page. The address I was meaning for you to see was [email protected].

Walter

Freeway user since 1997

http://www.walterdavisstudio.com