Highlighted

Website with contact form: not sending the email.

Explorer ,
Apr 12, 2019

Copy link to clipboard

Copied

Hello,

The contact sheet on my website is not sending emails.  I had contacted HostGator, thought it could be something there side, but they said:

"It is usually you using PHPMail that sends the email without the spf record and as such its blocked.  I highly recommend you should use SMTP to send the email out instead of PHPMailer"

I am not sure how to do this and he did not know and said that I should google it.

Would any one know what I will need to do?  My website is [personal infos deleted by moderator].

Thank you.

Sheila

Views

2.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Website with contact form: not sending the email.

Explorer ,
Apr 12, 2019

Copy link to clipboard

Copied

Hello,

The contact sheet on my website is not sending emails.  I had contacted HostGator, thought it could be something there side, but they said:

"It is usually you using PHPMail that sends the email without the spf record and as such its blocked.  I highly recommend you should use SMTP to send the email out instead of PHPMailer"

I am not sure how to do this and he did not know and said that I should google it.

Would any one know what I will need to do?  My website is [personal infos deleted by moderator].

Thank you.

Sheila

Views

2.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 12, 2019 0
Adobe Community Professional ,
Apr 12, 2019

Copy link to clipboard

Copied

PHPmailer is a library that helps you to construct the mail from A to Z, SMTP is also a library (beside the fact that it is a protocol) that helps you to send the mail.

both are really easy to use, and go hand in hand,

you should find everything that you need on the git hub

GitHub - PHPMailer/PHPMailer: The classic email sending library for PHP

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 2
Adobe Community Professional ,
Apr 12, 2019

Copy link to clipboard

Copied

by the way if you have trouble caused by SPF, think to open the SMTP autentification and use an URL that has the same domain than yours

$mail->SMTPAuth   = true

$mail->Username   = [personal infos deleted by moderator]

$mail->Password   = 'XXXXXXXXX';

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 2
Explorer ,
Apr 12, 2019

Copy link to clipboard

Copied

Thank you, I will have a look at GitiHub plus keep in mind the code that you gave below too.  I am learning on the job, so to say, so all the help I get is most welcomed.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 0
Adobe Community Professional ,
Apr 12, 2019

Copy link to clipboard

Copied

please don't hesitate, the github is full of samples

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 0
LEGEND ,
Apr 12, 2019

Copy link to clipboard

Copied

sheilaxs726  wrote

Thank you, I will have a look at GitiHub plus keep in mind the code that you gave below too.  I am learning on the job, so to say, so all the help I get is most welcomed.

I think you will find anything on Github beyond your pay-grade and likely difficult to understand and set up, its not meant for newbies but for geekies that understand coding terminology. Its highly likely that you will jump back in fear when it mentions setting up phpMailer via your computer terminal - it buries the much simpler zip download workflow as don't forget geekies tend to want to make the job much harder than it actually is.

Post back if you get stuck and I'm sure someone will provide you with more help.

Make sure your host doesnt support the php mail() function as that is far easier to set up and for a simple feedback form which requires no attachments its ideal.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 1
Adobe Community Professional ,
Apr 12, 2019

Copy link to clipboard

Copied

Sending e-mail from one's server is a lot more complicated now than it used to be.   Almost every web host I deal with is sending mail with SMTP, not PHP mail() function.   And if your mail doesn't contain proper identifying headers, it's often flagged & rejected as spam regardless of whether or not  it contains spam.  This makes it doubly hard for average coders to get mail through to Gmail, Hotmail and other web based e-mail systems.   PHPMailer may seem like overkill for some situations but it works.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 0
LEGEND ,
Apr 12, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/Nancy+OShea  wrote

Sending e-mail from one's server is a lot more complicated now than it used to be.   Almost every web host I deal with is sending mail with SMTP, not PHP mail() function.   And if your mail doesn't contain proper identifying headers, it's often flagged & rejected as spam regardless of whether or not  it contains spam.  This makes it doubly hard for average coders to get mail through to Gmail, Hotmail and other web based e-mail systems.   PHPMailer may seem like overkill for some situations but it works.

I really couldn't give a hoot about Gmail, Hotmail etc. I deal with professional email accounts, not some mickey-mouse personal email addresses. No serious client has a business address at Gmail or Hotmail and all of my hosts have the mail() function available to use.

It doesnt have to be complicated, developers and some hosts make it more complicated just about like everything else web-related these days.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 0
Adobe Community Professional ,
Apr 12, 2019

Copy link to clipboard

Copied

All hosts I deal with have PHP mail() fuinction too. But it's getting so it won't work without SMTP authentication.

osgood_  wrote

I really couldn't give a hoot about Gmail, Hotmail etc. I deal with professional email accounts, not some mickey-mouse personal email addresses.

You've missed the point entirely.  I am not talking only about e-mail sent to site owners. What about confirmation e-mails sent to customers who use Gmail, Hotmail, etc...?  I have several auto-generated e-mails that my server sends to customers at checkout.   Bounced e-mails are unacceptable.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 1
LEGEND ,
Apr 13, 2019

Copy link to clipboard

Copied

I havent had any issues with Gmail and the php mail function so far. I actually do have a Gmail test account for the reason you state. Infact Gmail works better than trying to get  form emails sent back to a business email address in some circumstances particularly in cases where the client has an internal email server installed or have moved to cloud email

There are a lot of dodgy companies installing email servers with no skill to configure them correctly to receive email from a website feedback form. The issues l generally get concerning client emails going astray can usually be associated with one of these contraptions but of course the installer always denies its their problem. Once l test the mail gets distributed correctly from the remote email server  to a Gmail account or my own business email, without hitting the box they have installed, they cant deny it and have to put ot right. WOW everyone else is getting the feedback apart from the email address it should be going back to, go figure.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2019 0
Explorer ,
Apr 13, 2019

Copy link to clipboard

Copied

I have GatorHost and they said I need to set up SMTP, I have used PHP mail and it just keeps getting blocked.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2019 0
Explorer ,
Apr 13, 2019

Copy link to clipboard

Copied

There is a lot to read upon, still not able to have a working contact form as yet for "possible" customers to send a message, but will keep at it.  Just do not want to ditch the idea of the contact form, looks good and professional!

Thank you again for your advice.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2019 0
LEGEND ,
Apr 13, 2019

Copy link to clipboard

Copied

Your latest posts suggest your website is hosted on a Windows server which would require using SMTP to process the form.

I pose that question because hostgator does support the php mail function according to their website but only on their compatible servers of which Windows is not one.

I would suggest you first check what kind of server your website is running on before deciding on a workflow to use to process your form.

I would highly recomend to anyone just starting out building websites and who is buying web hosting space to avoid buying into a Windows server workflow unless they specifically require it and if they do they will know why they are buying into it.

There is generally a lot more support and help available for Windowless servers as its a bigger eco system.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2019 0
Adobe Community Professional ,
Apr 13, 2019

Copy link to clipboard

Copied

Not wanting to cause more confusion, just give you my own experience.

I have a number of sites on a windows server due to various reasons. These sites do have an apache server and they do serve PHP mail().

I have other sites on an Nginx box with Apache running in parallel. Like Nancy OShea, I have had problems with GMail and Outlook accepting emails from my server when using PHP mail(). I have since changed to SMTP with positive results.

Not all servers offer SMTP because it takes extra effort to set up. This has to do with firewalls and the like. Fortunately, my IDE supplies a very easy way to configure for SMTP:

The idea of showing this image is to show the name of the host and the Port number. Further info may be required such as login details. These details were already explained by B i r n o uin the first two replies.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2019 2
LEGEND ,
Apr 13, 2019

Copy link to clipboard

Copied

The only 2 occasions l have had concerning the experience of working with Windows servers trying to run php ended in failure. Php is not native to Windows servers, so if you are planning to use php then use a dedicated php server would be my advice. I personally wont or should l say didnt accept jobs if a website was hosted on a Windows server without good reason. I would always move it to a more robust native  php server.

Every host sets up their server slightly differently. I always use the same host where possible and have had no trouble with using the php mail function. Infact a few weeks back l had to set up a Gmail account so the client could get any info sent from their website form as their dedicated  business mail address wasnt recieving the distribution from the client own internal email server, until someone fixed the problem.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2019 1
Adobe Community Professional ,
Apr 14, 2019

Copy link to clipboard

Copied

sheilaxs726  a écrit

I have GatorHost and they said I need to set up SMTP, I have used PHP mail and it just keeps getting blocked.

More and more servers are reinforcing their protection policies in case of email spoofing in order to limit SPAM.

in fact, when a server sends a message through a messaging function linked to a third language (PHP for example), there is no indication whether it is a usurpation (fraudulent mail) or a real sending of a message... so the sender server will identify itself with its DNS relating the IP addresses authorized to send messages, and especially with an authentication.

this information is not contained in the message header but in the envelope of the mail at the SMTP level. therefore, it is necessary to use a class that allows this type of operation. The simple mail() function, which was very effective until now, does not provide this functionality and therefore becomes ineffective.

hence the remark of your host.

if you have a problem using these tools, reassure yourself that it is very simple... if the examples provided on the github are not clear to you, do not hesitate to come back to us, we will help you to get through this step.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 14, 2019 2
LEGEND ,
Apr 14, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/B+i+r+n+o+u  wrote

sheilaxs726   a écrit

I have GatorHost and they said I need to set up SMTP, I have used PHP mail and it just keeps getting blocked.


hence the remark of your host.

Apart from the host actually does support the simple mail() function:

How to use sendmail with PHP « HostGator.com Support Portal

BUT not on their Window servers hence my post assuming the OPs website must be hosted on a Windows server IF the host provides information relating to SMTP in which case they advice using their SMTP workflow processing script.

https://support.hostgator.com/articles/specialized-help/email/miscellaneous-email-information/steps-...

Edited:

Having checked out the server info of the website in question it is hosted on a nginx/1.14.1 server so it should support the simple php mail() function, according to the information from the host website...........setting it up or the phpMailer alternative is another story for most who are new to retrieving information from a form.

I'd start by sending a very simple test through first to make sure everything is working then move onto the process of retrieving and securing the form input information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 14, 2019 0
Explorer ,
Apr 16, 2019

Copy link to clipboard

Copied

Thank you everyone for your advice.  I really appreciate your time and expertise.

I had contacted HostGator and they said that it is a Linux server and to check out their website for help or hire a developer.

I did find some code for a contact form on their website, it was interesting to slice and dice it into something a little more presentable.  It is not exactly what I wanted, as I really liked the first contact form that I had put together via a youtube tutorial, but I'd rather have one that works, so all in all I am pretty happy that I got my website up and running.

Thank you again.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 16, 2019 0
Explorer ,
Apr 16, 2019

Copy link to clipboard

Copied

Thank you very much.

It is a great source of information and now that I have my site up and running, I now have more time to read and absorb it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 16, 2019 0
Explorer ,
Apr 16, 2019

Copy link to clipboard

Copied

Thank you.  I have made a note of the properties for the setup mailer, have never seen this with HostGator though and I have been chatting with them for help with the SMTP and their advice was to check their website for help or seek help with a web developer, so I decided to just read info online, used what sounded good, refreshed, nothing happened that tried again and again, etc.  At last it is running, but I will certainly keep learning by trying out another website. In the end it was fun.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 16, 2019 0
Adobe Community Professional ,
Apr 18, 2019

Copy link to clipboard

Copied

don't forget to extend your reading to SPF which in fact is the cause behind the sending mail error, and the need of using SMTP

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
LEGEND ,
Apr 18, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/B+i+r+n+o+u  wrote

don't forget to extend your reading to SPF which in fact is the cause behind the sending mail error, and the need of using SMTP

Doesnt look as though SMTP is being used at all if the link to the perl processing script is anything to go by - formmail.pl - thats as old as Ben is.

Using the email recipent directly within the form:

<input type="hidden" name="recipient" value="shXXX@shXXXXXasXXXXXhaefer.XXXXX">

You can't tell em though!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
Adobe Community Professional ,
Apr 18, 2019

Copy link to clipboard

Copied

please try to reduce unnecessary confusion and amalgams in between posts... since I started publishing on this thread, I only mentioned PHPMailer, SMTP and SPF. I have never mentioned or alluded to any PERL scripts whatsoever to be used

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
LEGEND ,
Apr 18, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/B+i+r+n+o+u  wrote

please try to reduce unnecessary confusion and amalgams in between posts... since I started publishing on this thread, I only mentioned PHPMailer, SMTP and SPF. I have never mentioned or alluded to any PERL scripts whatsoever to be used

Then keep up to speed with what the OP is actually using to process their form, its currently NOT phpMailer. So either provide some useful help rather than posting a link to Github, which a novice won't understand, or shut up please.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
Adobe Community Professional ,
Apr 18, 2019

Copy link to clipboard

Copied

osgood_  a écrit

Then keep up to speed with what the OP is actually using to process their form, its currently NOT phpMailer. So either provide some useful help rather than posting a link to Github, which a novice won't understand, or shut up please.

I am sorry to see that after being absent from this forum a few weeks old habits do not change... thank you for the kindness of your comments.... I really appreciate it......

for your information, read message OP #1

sheilaxs726  a écrit

"It is usually you using PHPMail that sends the email without the spf record and as such its blocked.  I highly recommend you should use SMTP to send the email out instead of PHPMailer"

that was the main purpose of my answer... PHPMailer, SMTP and SPF... so I think that the answer was appropriate...

now to the fact of pointing at a github... if you carreffluy read the content you'll find a full folder of samples ready to be used

PHPMailer/examples at master · PHPMailer/PHPMailer · GitHub

and finally before concluding I have always added in my answers

https://forums.adobe.com/people/B+i+r+n+o+u  a écrit

if you have a problem using these tools, reassure yourself that it is very simple... if the examples provided on the github are not clear to you, do not hesitate to come back to us, we will help you to get through this step.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
LEGEND ,
Apr 18, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/B+i+r+n+o+u  wrote

I am sorry to see that after being absent from this forum a few weeks old habits do not change... thank you for the kindness of your comments.... I really appreciate it......

for your information, read message OP #1

Then talk some sense not just what you want others to hear. All I see you and others in this forum ever do is post url links to pages which are above and beyond the OPs pay-grade, that's not being helpful at all.

https://forums.adobe.com/people/B+i+r+n+o+u  wrote

"It is usually you using PHPMail that sends the email without the spf record and as such its blocked.  I highly recommend you should use SMTP to send the email out instead of PHPMailer"

That message was from the OPs host company, not the OP. At that point the OP had no idea what php mailer was, wasnt even considering using it and probably didnt need to use it. That was a host just being unhelpful much like most hosts, just tell them any old rubbish. I did some research, yes research unlike the host. The host clearly supports the php mail() according to the information on its website. Much simpler to set up, pretty helpful information I would say to a novice out of their depth. Is it any wonder you court the responses I fire at you at times. Every one seems to be cranky.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
Adobe Community Professional ,
Apr 18, 2019

Copy link to clipboard

Copied

osgood_  a écrit


The host clearly supports the php mail() according to the information on its website. Much simpler to set up,

yep , but as said before mail() deosn't handle SMTP and the host clearly specify that SPF was blocking because of that ... so mail() wasn't a way to go

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
Adobe Community Professional ,
Apr 18, 2019

Copy link to clipboard

Copied

osgood_  a écrit

All I see you and others in this forum ever do is post url links to pages which are above and beyond the OPs pay-grade, that's not being helpful at all.

and if it were simply up to them to say that our answers are not useful...?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
LEGEND ,
Apr 18, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/B+i+r+n+o+u  wrote

osgood_   a écrit


The host clearly supports the php mail() according to the information on its website. Much simpler to set up,

yep , but as said before mail() deosn't handle SMTP and the host clearly specify that SPF was blocking because of that ... so mail() wasn't a way to go

It was not clear at any point in post 1 what method the OP was using, if any. At the time of the posted question I looked at the OPs website, there wasnt even a form to be seen, just some input boxes with a button clicking to nowhere.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 18, 2019 0
Adobe Community Professional ,
Apr 12, 2019

Copy link to clipboard

Copied

Moved from Adobe Creative Cloud to Dreamweaver support forum​.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 12, 2019 0