0

I'm trying to create a website with Dreamweaver CS6, which I am doing just fine. On one of my pages, I want the visitor to be able to send me an email. I'm under the impression that I need a web server and PHP installed. Here's what I have tried:

  • Installed WAMP but couldn't get it to send the email. The errors indicated it didn't recognize PHP
  • Installed XAMPP. I got a little closer with this one but no luck
  • Installed Apache web server separately and got it configured. Installed PHP separately and seem to have it configured properly as I can see the PHPInfo page

I am running Windows 7 Ultimate 64bit / Apache 2.2.4 / PHP 5.2.6 (I have these older versions of Apache and PHP because I was following a tutorial and wanted to make sure I could get through it. I've tried downloading several free PHP mail forms to incorporate into this one page, contact.html but I can't get any of them to work. If there is some other way to achieve this I haven't been able to find it and everything I have read indicates you cannot do it with just HTML.

If there is anyone willing to take me through this step-by-step, it would be greatly appreciated.

AdamMc331
  • 16,492
  • 10
  • 71
  • 133
  • Matt is right you are going to need a mail server to send email from your laptop. I recommend installing https://www.hmailserver.com/ – Carl McDade Apr 18 '15 at 20:45

1 Answers1

2

Php needs to use smtp to send mail on windows. See a previous question here Apologies as I realise this should be a comment but my rep does not allow me to.

Community
  • 1
  • 1
Matt
  • 88
  • 1
  • 10
  • I've tried. No matter what I do when I click the send button it displays the php page in the browser that is supposed to send the mail. I don't know anything about php... – Steve R Apr 18 '15 at 22:10
  • If it displays the code then the php is not being parsed by the system correctly. Your php installation is not set up correctly. Can you edit your question to display any error messages and then I may be able to reproduce the problem on my own server and provide further help. – Matt Apr 18 '15 at 23:16
  • Sure. I'm not really getting error messages per say, like I said, just displays the page source for the php page that is supposed to send the mail. Below is post are the additional posts for the the code. The first block of code is the form I have embedded in the HTML, the second block is the php code and in all honesty, I got it from the Internet. I'm not suggesting the php is incorrect or anything, I just didn't write it. As a side, note, I have also tried copying my Dreamweaver site files into the Apache htdocs folder and it still doesn't work. – Steve R Apr 19 '15 at 14:24
  • Okay, I didn't realize I would get the character limitation error on this post. How can I get you the code? I used this right after I finished the install and it showed me the PHPInfo, but now it doesn't work and I'm not really sure what I've done for it not to work. – Steve R Apr 19 '15 at 14:30