Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a contact form that uses PHP using Google Apps Engine

I'm trying to make a contact form for my website using PHP. The form will send an email to my email account when someone fills it out telling me the information they put on the form. I have the code for the form in PHP but I do not have a server for the form to use. My idea was to use Google Apps since they support PHP somehow. I have downloaded the App Engine launcher and know how to host Apps but I can't seem to connect all the dots. Is it possible to have Google Apps handle sending the emails from a PHP website form to my gmail account. The website is static (HTML/CSS) and I am not currently using Google Apps to host the site but I can change that if necessary.

like image 627
Nick Gilbert Avatar asked Jan 30 '26 01:01

Nick Gilbert


2 Answers

You can definitely send mail from PHP on App Engine and you don't have to use the Google Apps for that.

As for how to actually connect the dots you should start from the Getting Started Tutorial and if you won't be able to do something there then ask a more specific question on that matter.

like image 177
Lipis Avatar answered Feb 01 '26 16:02

Lipis


It sounds like you want to setup a very simple app on Google App Engine, which provides a service for sending mail. You will probably need to change your existing code to swap out the PHP mail() API call for Google's own - see here:

https://developers.google.com/appengine/docs/php/mail/#PHP_Sending_mail

You need to make sure the address sending the emails is added to your app's accounts in the App Engine admin console.

like image 23
tx802 Avatar answered Feb 01 '26 15:02

tx802