[?] how to send mail in php?
thanks alot ^^!
[?] how to send mail in php?
thanks alot ^^!
For more info, see here.Code:<?php $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?>
If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:
You may find this topic of use:
http://forums.x10hosting.com/program...-html-php.html
You can also use the following code..
$to="someone@someweb.com;
$subject="Put in your subject here";
$message="Put your message here";
$header="From: sender@sender.com";
mail($to, $subject, $message, $header);
this is similar to the above except that some header variable are removed.
[LEFT][B]Sunil Sankar
-------------------------------------------------------------------------
best script for secured as well as basic mail....
<html>
<body><?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail( "someone@example.com", "Subject: $subject",
$message, "From: $email" );
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?></body>
</html>
You can use this to test if your site is capable of sending mail
<?
mail("emailadres@privoder.com","test","Ok, it works");
?>