i try to add attachment to my mailer. please help me

-----------------------------------------------------------------(this is mailer.php)--------------------------------------

&nbsp

&nbsp

&nbsp

<p>Send email to:<input name="to" type="text">
<p>Send email from:<input name="from" type="text">
<p>Set answer adress:<input name="reply" type="text">

&nbsp

Attachment:

Subject of the email:

The email:Write email here...

&nbsp

<p><font face="verdana"><input type="submit">
<p><font face="verdana"><input type="reset">
<form action="index.html">
<input type="submit" value="Back to homepage">
</form>

-----------------------------------------------------------------(this is process.php)--------------------------------------

<?php

$to = $_POST[“to”];
$subject = $_POST[“subject”];
$message = $_POST[“message”];
$from = $_POST[“from”];
$reply = $_POST[“reply”];

$headers = “From: $from \r\n”;
$headers .= “Reply-To: $reply \r\n”;
$headers .= ‘X-Mailer: PHP/’ . phpversion();

mail($to, $subject, $message, $headers);
?>



In mailer.php i have a form called “attachment”. In process.php i need the code that sends that attachment with the email.

Thanks for helping me out.

Do you understand what the meta refresh tag does or did you just see it somewhere and throw it in there?

Actualy i am not so good with html/php so i looked that meta tag up and threw it in.
I did what i want so no problem for me.
Maybe you can explain what is bad about that? thanks anyway

The meta refresh tag triggers when the browser sees it. It then counts from 0 to the number specified in the content section. When it reachs that number, those seconds, it goes to the url listed.

So, your page is redirecting before it starts the processing.

Okay i will set it to 1. But how can i add an attachment please?

You would actually be better served using something like PHPMailer. The general mail function does not respond to change well.

Sponsor our Newsletter | Privacy Policy | Terms of Service