General Community > Scripting Help

modify this email script to send attachments

(1/1)

hello:
hi    :D
i want modification of this mail form so that i can attach multiple image files with this....along with their little description which will be added in a text box at bottom of each pic upload field

also is there any way to hide the
to: field

plus it will be gr8 if u can tell me some other script that can send attachments to email addresses...and if they can check size and extension that will be really big gr8  :)
thanks a lot


--- Code: ---<?php
if ($state == "")
{
    $title="PhpMail";
    $header="Send An Email";
    $announce="Type A Message! (HTML Message and Multiple Attachments {with small modifications} Possible)";
}
else
{
    $title="PhpMail";
    $header="Your Message Sent!";
    $announce="Send Another Email...";
    if ($ccText != "") $ccText="cc: $ccText <$ccText>\n";
   if ($bccText != "") $bccText="Bcc: $bccText <$bccText>\n";
    if ($mailformat == "Text") mail($toText, $subjectText, $msgText,     "To: $toText <$toText>\n" .     "From: $fromText <$fromText>\n" .$ccText.$bccText.   "X-Mailer: PHP 4.x");
    if ($mailformat == "Html") mail($toText, $subjectText, $msgText,     "To: $toText <$toText>\n" .     "From: $fromText <$fromText>\n" .$ccText.$bccText.     "MIME-Version: 1.0\n" .     "Content-type: text/html; charset=iso-8859-1");
}

?>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title><?php echo($title)?></title>
</head>

<body link="#0000ff" alink="#0000ff" vlink="#0000ff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">

REPLACE THIS LINE WITH YOUR CUSTOMISED HTML CONTENT LIKE NAVIGATION BAR (HEADER PART)

  <b><font face="Arial" size="4" color="#000080"><?php echo($announce)?></font><font face="Arial" size="3"><br>
  </font></b>
  <form method="POST" action="<?php echo($PHP_SELF)?>">
    <p><font face="Arial" size="3"><b>To: <input type="text" name="toText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>Cc: <input type="text" name="ccText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>Bcc: <input type="text" name="bccText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>From: <input type="text" name="fromText" size="35"></b></font></p>
    <p><font face="Arial" size="3"><b>Subject: <input type="text" name="subjectText" size="46"></b></font></p>
    <p><font face="Arial" size="3"><b>Choose Email Format: </b></font>
    <font face="Arial" size="2">Plain Text <input type="radio" name="mailformat" value="Text"> HTML  <input type="radio" name="mailformat" value="Html"></font>
    </p>
    <p><font face="Arial" size="3"><b>Message Text:</b></font></p>
    <p><font face="Arial" size="3"><b><textarea rows="11" name="msgText" cols="60"></textarea></b></font></p>
    <p><font face="Arial" size="3"><b><input type="submit" value="Send" name="send" style="font-family: Arial; font-size: 12pt; font-weight: bold"></b></font></p>
    <p>&nbsp;</p>
    <input type="hidden" name="state" value="1">
  </form>

REPLACE THIS LINE WITH YOUR CUSTOMISED HTML CONTENT LIKE NAVIGATION BAR & COPYRIGHT INFORMATION (FOOTER PART)

</body>

</html>


--- End code ---

hello:
can any one please help with this
i really need it to working

Bouminok:
http://www.amazon.com/exec/obidos/tg/detail/-/067232525X/qid=1064755719/sr=8-1/ref=sr_8_1/102-5357992-8834500?v=glance&s=books&n=507846

Metho:
Or don't waste your money and:

www.php.net
www.mysql.net

to learn the language.

For some decent examples, www.devshed.com has some good ones...think there is even a three part article about php mail scripts. Not positive, though.

Methonis

Chris Cromer:
Neither of you where helpfull... please read this:

http://www.zend.com/zend/spotlight/sendmimeemailpart1.php

It contains all the mime types for sending mail, one of the examples shows how to send an attachement with mime types.

Navigation

[0] Message Index

Go to full version