0

i want to send a mail to a friend with my one-page compose mail site, i dont know how to implement the to: field, know a little of

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by vishesh
0

Is it that you want to send an email to this person...if so this is the script...... (put this where you want the user to type in the content and all that:


<form action="sending.php" method="POST">
Your email address: <input type="text" size="25" maxlength="40 "name="mailer" ><br><br>
Your Name <input type="text" style="margin-left:50px;" size="25" maxlength="40 "name="from" ><br><br>
Message :
<input type="message" class="content" height="150px" name="message">
<br>
<br>
<input type="submit" style="margin-left:20px;"" "value="Send">

</form>

*****and then put this on a page entitled "sending.php"..................:

<?php
$to = "Your_email_address_here@hotmail.co.uk;
$subject = "Your site's message from $from";
$mail = "$from, whos email is $mailer, would like to say : $message";
$body = "$mail";
if (mail($to, $subject, $body)) {
echo("<p>Your message has been sent to the Administrator of this site</p>");
} else {
echo("<p>Message delivery failed...Please try again, and remember to fill in all the forms!</p>");
}
?>

.... and that will be your email form.... on your site your users will be able to send you emails directly from the page! --- oh and all you need to change really is the email.

any help?

0

Well Designer_101, I am actually surprised that even after 25 posts you dont use [ code ] tags. There are actually [ code ] tags in which you could wrap your code, it would colourise(more precisely Syntax Highlight) and indent your code properly. Read This.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.