Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[php]App direct to email

Junior Spellweaver
Joined
Aug 17, 2010
Messages
161
Reaction score
14
Hello peoples . I want to know html or php script how to get apply direct to email

What i've tryed :
PHP:
<form action="My email" />
Problem : it directed me to my site path /My Email

2nd.
PHP:
<form action="mailto:MyEmail" />
Didn't work ..

3rd.
PHP:
<?php
$to="My email";
mail("$to");
?>
Didnt work

Help ?:?::ehh:
 
Newbie Spellweaver
Joined
Aug 20, 2008
Messages
93
Reaction score
0
Re: [Help]App direct to email[Help]

Code:
<?php
 $to = "recipient@example.com";
 $subject = "Hi!";
 $body = "Hi,\n\nHow are you?";
 if (mail($to, $subject, $body)) {
   echo("<p>Message successfully sent!</p>");
  } else {
   echo("<p>Message delivery failed...</p>");
  }
 ?>

You didnt get any mail because probably there was no message or title to be sent.
 
Joined
Sep 10, 2006
Messages
2,817
Reaction score
1,417
1) use proper title

2) stop attempting to write php or html when you have absolutely, ABSOLUTELY no basic knowledge

form action basically tells the browser on what page should it send what you've posted, "/" if the thing that handles your form is on the same page "/mail.php" if it's in mail.php for example, along action you *should* define method, post or get.

also you can not use shorttag at form, where would the inputs be?

then why would you wrap $var in quotes at all? also mail() works only on server that has mail server installed and I'm sure that it won't work with just "to", not withough warnings or some poop.
 
Skilled Illusionist
Joined
Jul 24, 2010
Messages
319
Reaction score
27
1) use proper title

2) stop attempting to write php or html when you have absolutely, ABSOLUTELY no basic knowledge

form action basically tells the browser on what page should it send what you've posted, "/" if the thing that handles your form is on the same page "/mail.php" if it's in mail.php for example, along action you *should* define method, post or get.

also you can not use shorttag at form, where would the inputs be?

then why would you wrap $var in quotes at all? also mail() works only on server that has mail server installed and I'm sure that it won't work with just "to", not withough warnings or some poop.

Chillz He can code look at my latest thread and its a simple question people no need for flames (nice soft voice :p)
 
Back
Top