Re: [PHP] Problem in sending mail with mail() function

2001-04-26 Thread nik



Sigitas Paulavicius wrote:

 Vishak K Tomy [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hello,
  I tried to send mail through the mail function but it is not
  working. I am using php version 3.0.12 under linux, following is the
  code I used to send mail.
  So what is the problem with it, any body please solve this.
 
  Regards
  Vishak

 Hi

 mail() uses the SMTP service running on localhost...errr... on the same
 computer as the web service is running. So if there is no smtp service on
 localhost, mail() won't work.
 You must get SMTP libraray and use it to connect to some other server and
 send the message. It's really simple and easy to come by.

As far as I understand it, SMTP doesn't have to be on the same computer, but
it's location does have to be configured right in php.ini or whatever.  Check
phpinfo() for PHP core configurations setting sendmail_path (Unix/Linux) or
SMTP (Windows) - the SMTP value is the IP of an SMTP server.

nik


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem in sending mail with mail() function

2001-04-25 Thread Vishak K Tomy

Hello,
I tried to send mail through the mail function but it is not 
working. I am using php version 3.0.12 under linux, following is the
code I used to send mail.
So what is the problem with it, any body please solve this.

Regards
Vishak

html

?php
if ($submit) {
$recipient =
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED];
$sub = this is a test;
$message = this is a test message;
$headers .= From: $from \n;
$headers .= reply-To:$from\nX-Mailer: PHP/ .phpversion(). \n;
$headers .= Content-Type: text/html; charset=iso-8859-1\n;
$headers .= X-Priority: 1;
mail($recipient,$sub,$message,$headers);
}
?
form action=?php echo $PHP_SELF ?
input type=submit value=submit
/html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem in sending mail with mail() function

2001-04-25 Thread Sigitas Paulavicius


Vishak K Tomy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,
 I tried to send mail through the mail function but it is not
 working. I am using php version 3.0.12 under linux, following is the
 code I used to send mail.
 So what is the problem with it, any body please solve this.

 Regards
 Vishak

Hi

mail() uses the SMTP service running on localhost...errr... on the same
computer as the web service is running. So if there is no smtp service on
localhost, mail() won't work.
You must get SMTP libraray and use it to connect to some other server and
send the message. It's really simple and easy to come by.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]