email sender script help

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

3 replies · 409 views · started 16 years ago · 1 min read

3 participants
Jerson Developer · 70 posts #1

anybody can help me? I need mobile email sender...thank you

Cuteprince Newbie · 4 posts #2

Sending email with php is not a big deal try the script below create a file mailform.php and paste the code below ,replace someone@example.com with you email

<html>
<body>

<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email'] ;
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail( "someone@example.com", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' /><br />
  Subject: <input name='subject' type='text' /><br />
  Message:<br />
  <textarea name='message' rows='15' cols='40'>
  </textarea><br />
  <input type='submit' />
  </form>";
  }
?>

</body>
</html> 
Jerson Developer · 70 posts #3

not working haha

metulj Super moderator Principal · 1,726 posts #4

Jerson wrote: not working haha

<?php

echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">';
echo "<head>";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />";
echo "<title>Sitename | E-mail</title>";
echo "<meta name=\"description\" content=\"emailer\" />";
echo "</head><body>";
echo "<div align=\"center\">";
echo"<br/><br/>Emailer :)<br/><br/><br/>";
    
?>

<form action="<? echo $_POST['self']; ?>" method="post">
<input name="subject" type="text" value="-=subject=-" size="21" maxlength="30"><br>
<input name="email" type="text" value="-=receiver=-" size="21" maxlength="35"><br>
<textarea name="message" cols="17" rows="7">-=message=-</textarea><br>
<input name="send" type="submit" value="Send">
</form>

<?

if (@$_POST['send']=="Send")

{

$email=$_POST['email'];
$subject=$_POST['subject'];
$message=$_POST['message'];

mail($email, $subject, $message);
echo "Sent to adress: <br/><i>$email</i>";
echo "<br/><br/>";
echo "<a href=\"index.php\">Send another E-mail</a>";

}

echo "</div>";
echo "</body></html>";
      
?>

not safe, not nice coding, but surelly sends email

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Attachments: index.zip

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close