Regarding PHP email sending


I have created a contact us page in my php website. I want if any user send any message through it it will come to my gmail id how to do that ?

Well, there are a lot of samples on this site where this has been covered before. You could search for them.
But, I would just start in the PHP manual. It has a nice sample on how to do this. Here is the link you need.

Once you get it coded, if you have problems, show us your code and we will help you finish it up… Good luck!


$subject = “Your message title”;
$message = “Hey, how’s it going?”
$headers = “From: Billy Bob”;

mail(‘[email protected]’, $subject, $message, $headers);


[email protected] is whatever address you want the message sent to.

// This is VERY basic. Be careful.

Sponsor our Newsletter | Privacy Policy | Terms of Service