Page 1 of 1

problem with mail() - "failed to connect" error

Posted: Wed Jun 26, 2002 12:24 pm
by verabug
Here is my script for sending an email to a new user after they register:

Code: Select all

$eaddress = $email;

$subject = "blablabla";

$msg = "<html><head></head><body bgcolor="#ffffff">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#006699">Hi $username!<br><br>
blablabla<br><br></body></html>";

$headers = "From: me@somewhere.edu\nContent-Type: text/html";

mail($eaddress, $subject, $msg, $headers);
This is the error message I get:
Warning: Failed to Connect in c:\program files\apache group\apache\htdocs\eq_register.php on line 101
Anybody know why?

Posted: Wed Jun 26, 2002 2:16 pm
by Zmodem
Could be a lot of reasons.

- Is there an SMTP server installed on the machine your script is running on?
- If UNIX, is Sendmail working properly?
- Is the configuration of email set properly in php.ini ?