FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Direct e-mail





marixworld
i've just made a website and i'm thinking maye i could allow people who visit my website to send me an e-mail directly from one of the pages probably on the contact.php page. but i was wondering if i could be possible, or maybe it is. can anybody please give a hand on how to do it. Thanks
MrBlueSky
Use the mail() function in PHP.

Example:

www.php.net wrote:

<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com\' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

AOP Web Development
tol... much better na mag download ka nang php_manual sa php.net para may references kah.. hehehee'
Gundamxxg
just an FYI headers in the mail function no longer work, they are seen as spam and 99% of email services with kill the message before it is sent. It would be a good idea not to include them.

just use

Code:

<?
$to = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];

mail($to, $subject, $message);
?>
[/code]
kv
AOP Web Development wrote:
tol... much better na mag download ka nang php_manual sa php.net para may references kah.. hehehee'


Ok, I understood that "hehehee" part Very Happy
MrBlueSky
kv wrote:
AOP Web Development wrote:
tol... much better na mag download ka nang php_manual sa php.net para may references kah.. hehehee'


Ok, I understood that "hehehee" part Very Happy


LOL Very Happy I think it has also something to do with downloading and php.net Very Happy

I wonder what language he was talking..
fromegame
MrBlueSky wrote:
kv wrote:
AOP Web Development wrote:
tol... much better na mag download ka nang php_manual sa php.net para may references kah.. hehehee'


Ok, I understood that "hehehee" part Very Happy


LOL Very Happy I think it has also something to do with downloading and php.net Very Happy

I wonder what language he was talking..


Something what they speak in Philippines Rolling Eyes

On-Topic now! xD
Related topics
Australian state to ban workplace e-mail spying
Web e-mail !
Neat e-mail account
Play bay E-Mail (PBeM)
e-mail problems
Longest domain name in the world!
[RESOLVED]OK, so l've noticd that e-mail takes space...
e-mail
e-mail
What is up with the POP3 e-mail?
Paypal E-Mail Scam
E-mail me button help
1GB Alan,2GB e-mail alanύ,oyunlar,ajanda vs...Webtop!!!
.net Domain with unlimited e-mail - Best company?
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.