Posted by BuggyCoder on Tue 19 Aug 22:34
report abuse | View followups from nnn | download | new post
- <head>
- <title>
- ::PHP Mailor with attachment::
- </title>
- <style>
- body{background-color:#111111; color:#FFFFFF; font-family:Verdana;}
- table{background-color:#222222}
- input{border-color:#000000; color:#FFFFFF; border-width:1; background-color:#222222}
- textarea{border-color:#FFFFFF; color:#FFFFFF; border-width:1; background-color:#222222}
- </style>
- </head>
- <body>
- <table border=0 align=top>
- <B>Assembled by BuggyCoder <br><a href="http://bug-code.blogspot.com">Bug-Code Blog</B>
- <form name="form1" method="post" action="" enctype="multipart/form-data">
- <tr>
- <td align=right valign=middle>mailfrom:</td>
- <td align=left valign=middle><input type=value name=mailfrom size=40></td>
- </tr>
- <tr>
- <td align=right valign=middle>mailto:</td>
- <td align=left valign=middle><input type=value name=mailto size=40></td>
- </tr>
- <tr>
- <td align=right valign=middle>subject:</td>
- <td align=left valign=middle><input type=value name=mailsubject size=40></td>
- </tr>
- <tr>
- <td align=right valign=top>msg:</td>
- <td align=right valign=middle><textarea rows=10 cols=50 name=mailmessage size=20></textarea></td>
- </tr>
- <br>
- <br>
- <tr>
- <td align=right valign=middle colspan=2><input type="submit" name="submit" value="submit"> </td>
- </tr>
- <br>
- <?
- if ($_POST['submit']=="submit"){
- $mail_from = $_POST[mailfrom];
- $mail_to = $_POST[mailto];
- $mail_subject = $_POST[mailsubject];
- $mail_message = $_POST[mailmessage];
- if ($_FILES['imagefile']['name']=="")
- {
- }
- $file = $_FILES['imagefile']['name'];
- $header = "From: <".$mail_from.">\r\n";
- $header .= "MIME-Version: 1.0\r\n";
- $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n";
- $header .= "This is a multi-part message in MIME format.\r\n";
- $header .= "--".$uid."\r\n";
- $header .= "Content-type:text/plain; charset=iso-8859-1\r\n";
- $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
- $header .= $mail_message."\r\n\r\n";
- $header .= "--".$uid."\r\n";
- $header .= "Content-Type: application/octet-stream; name=\"".$file."\"\r\n"; // use
- $header .= "Content-Transfer-Encoding: base64\r\n";
- $header .= "Content-Disposition: attachment; filename=\"".$file."\"\r\n\r\n";
- $header .= $content."\r\n\r\n";
- $header .= "--".$uid."--";
- } else {
- }
- //This script is totally assembled from internet with some modification from the author ,you are free to edit and modify the script.
- //The Author holds no responsbilty from the illegal use of this script .
- ?> </form>
- </table>
- </body>
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.