|
-
Jan 29th, 2002, 11:17 PM
#1
Thread Starter
Member
PHP Learning
I've got this code:
PHP Code:
<?php
/* recipients */
$to = "Arien Talabac <[email protected]>" . ", " ; //note the comma
/* 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 */
mail($to, $subject, $message, $headers);
?>
But I get an error on the last line (mail($to...):
PHP Code:
Warning: Server Error in d:\apacheroot\phppages\sendmail.php on line 22
I defined my SMTP server in the php.ini file to be mail.*****.**.home.com (replacing the *s ) but it still doesn't work, and I can't find any error log to see what error was generated.
-
Jan 30th, 2002, 01:56 PM
#2
Addicted Member
Where it says "//note the comma" Did you try ripping off the comma? The comma means you're going to send it to another recipient as well.
cudabean
-
Jan 30th, 2002, 05:56 PM
#3
Thread Starter
Member
No change. How can I find out more details about the error?
-
Jan 30th, 2002, 07:42 PM
#4
PowerPoster
did you get rid of the dot as well, like
since that is the string concatenation char.
-
Jan 30th, 2002, 07:49 PM
#5
Thread Starter
Member
Yeah, but I still get that one error (well, warning). Does the PHP module have log files so I can see what "server error" occurred?
-
Jan 30th, 2002, 07:53 PM
#6
PowerPoster
it must be some sort of config problem because PHP's compile errors are a lot more useful than that.
Anyway, check this for error log stuff
http://www.php.net/manual/en/ref.errorfunc.php
theres also a link by some guy for a handler class.
-
Jan 30th, 2002, 11:34 PM
#7
are you using Apache or IIS?
I also think you can't do this
$to = "Arien Talabac <[email protected]>" . ", " ; //note the comma
it needs to be this
$to = "[email protected]";
if you use apache it has it's own log file. check out what it says..
-
Jan 31st, 2002, 06:56 AM
#8
Thread Starter
Member
I'm using Apache, but there was nothing but 404s and Access Denied errors in the log file.
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
|