joe2movies
Wed 28 February 2007, 12:45 pm GMT +0100
HI again i used the phpmail class
Here is the code below but somehow i can't get the attachment with the email.
I created a form to select a file from a local drive but its not sending the attachment.
<?php
include_once("attach_mailer_class.php");
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form enctype="multipart/form-data" action="test.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="userfile" type="file" />
<br><br> <input type="submit" value="Upload File" />
</form>
<?php
print_r($_FILES);
$test = new attach_mailer("Joseph Luong", "diep@chariot.net.au", "diep@chariot.net.au", "copy@provider.com", "blind@copy.org", "Test mime email class subject");
$test->text_body = "...Some body text\n\n the admin";
$test->add_attach_file($_FILES['userfile']['name'],$encoding = "base64", $dispo = "attachment",$type=$_FILES['userfile']['tmp_name']);
$test->process_mail();
?>
</body>
</html>
Here is the code below but somehow i can't get the attachment with the email.
I created a form to select a file from a local drive but its not sending the attachment.
<?php
include_once("attach_mailer_class.php");
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form enctype="multipart/form-data" action="test.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="userfile" type="file" />
<br><br> <input type="submit" value="Upload File" />
</form>
<?php
print_r($_FILES);
$test = new attach_mailer("Joseph Luong", "diep@chariot.net.au", "diep@chariot.net.au", "copy@provider.com", "blind@copy.org", "Test mime email class subject");
$test->text_body = "...Some body text\n\n the admin";
$test->add_attach_file($_FILES['userfile']['name'],$encoding = "base64", $dispo = "attachment",$type=$_FILES['userfile']['tmp_name']);
$test->process_mail();
?>
</body>
</html>