[color=\"green\"]well..ive got a contact style mail thingy (technical, i know) on my website..and when i get an email sent to me from my site..it comes up as being sent by \"anonymous@ev1..blah\" ..that doesnt bother me..what does is that i get no text or anything in the email..there is no body to it <img src=\'http://www.killanet.net/forum3/public/s ... #>/cry.gif\' class=\'bbc_emoticon\' alt=\':(\' />
HTML (contact.php)
[code]<form method=\'post\' action=\'comments.php\'>E-Mail: <INPUT TYPE=\'TEXT\' NAME=\'email\' size=30><br>Subject: <INPUT TYPE=\'TEXT\' NAME=\'subject\' size=30><br>Comments: <TEXTAREA NAME=\'comments\' ROWS=10 COLS=30></TEXTAREA><br><input type=\'submit\' name=\'submit\' value=\'submit\'></form>[/code]
PHP (comments.php)
[code]<?
mail("vercz@killanet.net", "$subject", "$comments", "$email");
header ("Location: http://vercz.killagraphix.com");
?>[/code]
im stumped <img src=\'http://www.killanet.net/forum3/public/s ... sleepy.gif\' class=\'bbc_emoticon\' alt=\'(sleep)\' /> [/color]
mail function
Moderators: Moderator, Global Moderator
mail function
What is [b]$subject $comments [/b]and[b] $email[/b] set to?
[align=center]

“If you stop learning, you stop living.” ~Tami Quiring
“It's the rare man who understands the value of a single perfect rose.”
[/align]

“If you stop learning, you stop living.” ~Tami Quiring
“It's the rare man who understands the value of a single perfect rose.”
[/align]
mail function
firstly, just incase you didn\'t set $email etc, they can be set by doing something like this for each variable...
[quote]$email = $_POST["email"];[/quote]
(i assume this is already done though <img src=\'http://www.killanet.net/forum3/public/s ... igwink.gif\' class=\'bbc_emoticon\' alt=\';)\' /> )
if the body is formed by $comments, after doing the above I\'d use a syntax something like:
[quote]mail("vercz@killanet.net",$subject,$comments);[/quote]
that\'d be the solution in its most simple form, however, if you dislike the anon@ev1server...
you can use something like this:
[quote]mail("vercz@killanet.net", $subject, $comments,
"From: feedback@vercz.killanet.net\r\n" .
"Reply-To: {$email}\r\n")[/quote]
that should show up in your inbox as being from feedback@vercz.kn, doesn\'t matter if the email address doesn\'t actually exist in this case... hope it helps <img src=\'http://www.killanet.net/forum3/public/s ... >/good.gif\' class=\'bbc_emoticon\' alt=\'(Y)\' />
[quote]$email = $_POST["email"];[/quote]
(i assume this is already done though <img src=\'http://www.killanet.net/forum3/public/s ... igwink.gif\' class=\'bbc_emoticon\' alt=\';)\' /> )
if the body is formed by $comments, after doing the above I\'d use a syntax something like:
[quote]mail("vercz@killanet.net",$subject,$comments);[/quote]
that\'d be the solution in its most simple form, however, if you dislike the anon@ev1server...
you can use something like this:
[quote]mail("vercz@killanet.net", $subject, $comments,
"From: feedback@vercz.killanet.net\r\n" .
"Reply-To: {$email}\r\n")[/quote]
that should show up in your inbox as being from feedback@vercz.kn, doesn\'t matter if the email address doesn\'t actually exist in this case... hope it helps <img src=\'http://www.killanet.net/forum3/public/s ... >/good.gif\' class=\'bbc_emoticon\' alt=\'(Y)\' />
Last edited by ner0 on Wed Dec 29, 2004 7:32 pm, edited 1 time in total.
[color=\"green\"]'class KPIM::ProcessManager' only defines private constructors and has no friends[/color] <-
poor class
[18:09:00] * ~Moppy stews ner0 erotically 1 times.
[18:09:00] * ~Moppy stews ner0 erotically 1 times.
mail function
[color=\"green\"]yay! it works now..i edited your code a bit ner0. now its like this
[code]<?
$email = $_POST["email"];
$subject = $_POST["subject"];
$comments = $_POST["comments"];
mail("vercz@killanet.net", "$subject", "$comments",
"From: feedback@vercz.killanet.net\r\n" .
"Reply-To: {$email}\r\n");
header ("Location: http://vercz.killagraphix.com");
?>[/code]
whee ;x [/color]
[code]<?
$email = $_POST["email"];
$subject = $_POST["subject"];
$comments = $_POST["comments"];
mail("vercz@killanet.net", "$subject", "$comments",
"From: feedback@vercz.killanet.net\r\n" .
"Reply-To: {$email}\r\n");
header ("Location: http://vercz.killagraphix.com");
?>[/code]
whee ;x [/color]
mail function
<img src=\'http://www.killanet.net/forum3/public/s ... >/good.gif\' class=\'bbc_emoticon\' alt=\'(Y)\' /> glad it worked out vercy
[color=\"green\"]'class KPIM::ProcessManager' only defines private constructors and has no friends[/color] <-
poor class
[18:09:00] * ~Moppy stews ner0 erotically 1 times.
[18:09:00] * ~Moppy stews ner0 erotically 1 times.


