16 Replies Latest reply: May 2, 2013 7:09 AM by G-Ahh RSS

    Email Contact Form Problem

    G-Ahh

      I have set up a contact form on my website to be e-mailed to an e-mail address I have set up for the site on clicking the "submit" button. I have apparently succeeded in associating the PHP script to the form, as I get the PHP error message every time I click the submit button to show the e-mail has not been sent. Having worked my way down to the simplest of PHP scripts and triple checking all my variable details are matching the names in the HTML, I tried checking with my host Netcetera if there was something I needed to do at their end.

       

      They replied "The form mail should be authenticated with a valid email address and its password. Please use SMTP host as mail.netcetera.co.uk"

       

      I cannot find anyway of doing this directly in Dreamweaver nor any guidance on Adobe on how to do this.

       

      Any ideas?

       

      Gordon (Obviously a newbie)

        • 1. Re: Email Contact Form Problem
          Ken Binney MVP

          Hi and welcome Gordon -

           

          Open your PHP script file in any text editor or in DW code view, make the correction, save and upload to server.

           

          If you're still having problems, please post the entire code for your script here.

          A link to your page online will also help.

          • 2. Re: Email Contact Form Problem
            osgood_ MVP

            Sounds to me as though your host is making you jump through hoops which is unecessary....I'd be out the door in a flash and onto another host that makes life easier. I've worked on dozens of servers over a few years an never come across this kind of crap.

             

            Ask them to forward you an example of a form mail with php STMP authentication. Their resource center only shows an asp example which is no good to you.

             

            https://my.netcetera.co.uk/support/index.php?/Knowledgebase/Article/View/98/0/using-aspema il-to-send-form-results

             

            Thought I read in an early post that the host does not allow php 'mail' (for some  reason) so what are you using to send the mail?

            • 3. Re: Email Contact Form Problem
              polar_bare Community Member

              It's probably hosted with IIS, thus the ASP extension. If you are using PHP, then you might want to check this link.:https://my.netcetera.co.uk/support/index.php?/Knowledgebase/Article/View/321/8/how-do-i-se nd-email-with-phpmailer-for-windows-hosting

              • 4. Re: Email Contact Form Problem
                osgood_ MVP

                Nice one Jim,

                 

                Couldn't find the reference myself to the php angle.........I'd get frustrated too quickly. I like to do things the way I know works for me so if I come up against any host which doesn't conform to MY requirements I wouldnt use them. I guess its the fault of the OP for not checking out what is best for them to use for ease of use.

                 

                Os

                • 5. Re: Email Contact Form Problem
                  G-Ahh Community Member

                  Thanks one and all. I have just tried the script from netcetera. Oddly it

                  does not send an email to the designated address (unless it is very slow to

                  go through!), but navigates the browser from the site contact page to a php

                  page showing the entire PHP script??

                   

                  Odd, but I think this provides me with the variables I need to embed into

                  the PHP I was using and then see if that works.

                   

                  Cheers,

                   

                  Gordon

                  • 6. Re: Email Contact Form Problem
                    G-Ahh Community Member

                    Actually just taken a closer look at the script and it requires you

                    download PHPMailer (https://github.com/Synchro/PHPMailer#readme).

                     

                    Gordon

                    • 7. Re: Email Contact Form Problem
                      osgood_ MVP

                      I dont think they make that very clear in their example: I mean what the •••• is c: and why are the slashes all backwards instead of forwards / (maybe I'm missing something here or the host is)

                       

                      require("c:\php\includes\class.phpmailer.php");

                      • 8. Re: Email Contact Form Problem
                        G-Ahh Community Member

                        Yep - they do the same thing with the slashes when giving their root

                        folder, which of course does not work. Been with Netcetera for 5 days and

                        feels like a month!

                        • 9. Re: Email Contact Form Problem
                          osgood_ MVP

                          G-Ahh wrote:

                           

                          Yep - they do the same thing with the slashes when giving their root

                          folder, which of course does not work. Been with Netcetera for 5 days and

                          feels like a month!

                           

                          lol....good luck, hope you get the email problem resolved now you have some tangable information to work with.

                          • 10. Re: Email Contact Form Problem
                            polar_bare Community Member

                            You should probably check to see if it will even run PHP. Have you created a page with a php extension and if so does it display correctly?

                             

                            Sometimes the script needs to be in a folder with permissons that allows scripts to run, which you might be able to do with a CPANEL control somewhere or a folder called scripts.

                             

                            You shouldn't be required to use their script and should be able to write your own (I purchased software to do this, as I don't writ PHP mail processing scripts).

                             

                            Jim

                             

                            PS. Another thing that I have come across is that the sending email (from in your script) must actually be an email address. So if you are wanting to send a confirmation email, that address that is sending it to the form filler outer it can't be a junk address. If you can set up an email account for this form, I would suggest noreply@mydomain.com (with your domain information of course).

                            • 11. Re: Email Contact Form Problem
                              G-Ahh Community Member

                              Thanks Jim. It appears to run the scripts as prior to including the SMTP

                              arrays for authenticating the form, the PHP script appeared to work via  a

                              default error message I had set up if the e-mail failed to send. On the

                              website this error message came up correctly in a webpage ending PHP rather

                              than html when the submit button was clicked.

                               

                              The problem I am having is pinning down exactly how the SMTP authentication

                              array should be set up and actioned in the mail command. Right now all the

                              various versions I have picked up from the web come up with internal server

                              error messages when I try to discover them on Dreamweaver.

                               

                              It looks like I am going to just have to bite the bullet and do the Adobe

                              PHP tutorial set and hope that provides me with sudden enlightenment!

                               

                              Gordon

                              • 12. Re: Email Contact Form Problem
                                polar_bare Community Member

                                Gordon-can you provide a link to the trouble contact form? I am having a hard time trying to guess what might be wrong. If you have a few extra buck/pounds, then you might want to look at this for creating the script for you. It takes a few minutes to set up properly (and save your settings for the form), but this has worked for me across classic asp and php. I haven't tried the perl aspect yet and not that there is no technical support (lost their developer) but I have an older version and it works for asp and php.

                                 

                                http://www.bebosoft.com/products/formstogo/overview/

                                 

                                Os writes his own script and is very knowledgeable on this, me, don't write scripts too busy with all my other duties (lame excuse Os I know, but I'm sticking to it).

                                 

                                Jim

                                • 13. Re: Email Contact Form Problem
                                  G-Ahh Community Member

                                  Jim - as it happens the server is now down, so I can't even do anything

                                  more to it for now.

                                   

                                  I have got an IT analyst friend now looking at one of the scripts I have

                                  tried that does everything I want BUT send the actual e-mail. If they pin

                                  down what I am doing wrong I will post the correct script that works on

                                  Netcetera for anyone who finds they have the same problem.

                                   

                                  Gordon

                                  • 14. Re: Email Contact Form Problem
                                    polar_bare Community Member

                                    I noticed that the server was down. That's not good for business. Good luck.

                                    • 15. Re: Email Contact Form Problem
                                      osgood_ MVP

                                      Jim Carpenter wrote:

                                       

                                       

                                      Os writes his own script and is very knowledgeable on this, me, don't write scripts too busy with all my other duties (lame excuse Os I know, but I'm sticking to it).

                                       

                                       

                                       

                                      I like to know how things work becasue I feel more in control. There are some very good off the shelf form creators out there and if they suit your purpose no reason not to use them. I know nothing about phpmailer and using STMP validation though as I've never had the ocassion to deploy it (so far) - so unfortunatley can't really help in this situation.

                                       

                                      Os

                                      • 16. Re: Email Contact Form Problem
                                        G-Ahh Community Member

                                        Thanks OS - I am partly using this as a learning curve as I plan to develop

                                        the site later to do far more clever bits and pieces for customers (though

                                        I did not expect something this simple would be so problematic).