|
-
Jan 30th, 2002, 08:58 PM
#1
Thread Starter
Member
PHP and mail sending
"Pretend" just for a second that I installed PHP 4 and have no clue how to write PHP code. Having said that , how would I go about writing a page that sends an e-mail to [email protected]? I tried some of Chris's code but debugging it gets screwed in the bold line and I'd prefer another method JIC this one never works (he did say it was designed for php3).
PHP Code:
<?php
/* recipients */
$to = "Arien Talabac <[email protected]>" ;
/* subject */
$subject = "Test Mail";
/* message */
$message = '
Test message
';
/* To send HTML mail, set the Content-type header. */
//$headers = "MIME-Version: 1.0\n";
//$headers = "Content-type: text/html; charset=iso-8859-1\n";
/* additional headers */
$headers = "From: TurtleTips Auto-Mailer <[email protected]>\n";
/* and now mail it */
[b]mail($to, $subject, $message, $headers);[/b] // Says a "server error"
?>
The code above is at http://www.turtletips.com/phppages/sendmail.php. I have successfully run a "Hello, world" program so at least PHP is installed right.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|