Re: [PHP] mail() function HELP

2008-03-04 Thread Stut

On 4 Mar 2008, at 21:18, Sofia Jacob (CA) wrote:

I'm getting problems with the mail() function.

ERROR:

Warning: mail() [function.mail]: Failed to connect to mailserver at  
 port 25, verify your SMTP and smtp_port setting in php.ini or  
use ini_set() in C:\wamp\www\php_sandbox\user_auth_fns.php on line 170



I'm using Windows XP prof. and WAMP5 -server

Here what I did:

1) I download sendmail.zip from http://glob.com.au/sendmail/

2) I unzip this in a folder on c:\wamp\sendmail

3) I edited  PHP.INI file

[mail function]
; For Win32 only.
SMTP =
smtp_port =

; For Win32 only.
;sendmail_from =

; For Unix only.  You may supply arguments as well (default:  
sendmail -t -i).

;sendmail_path = C:\wamp\sendmail\sendmail.exe -t


I don't mean to be rude, but what part of For Unix only confused you?

You need to point the For Win32 only settings at a mail server on  
Windows. The error message pretty clearly states that it's trying to  
connect to the server specified in those settings.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() function HELP

2008-03-04 Thread Shawn McKenzie
Stut wrote:
 On 4 Mar 2008, at 21:18, Sofia Jacob (CA) wrote:
 I'm getting problems with the mail() function.

 ERROR:

 Warning: mail() [function.mail]: Failed to connect to mailserver at 
 port 25, verify your SMTP and smtp_port setting in php.ini or use
 ini_set() in C:\wamp\www\php_sandbox\user_auth_fns.php on line 170


 I'm using Windows XP prof. and WAMP5 -server

 Here what I did:

 1) I download sendmail.zip from http://glob.com.au/sendmail/

 2) I unzip this in a folder on c:\wamp\sendmail

 3) I edited  PHP.INI file

 [mail function]
 ; For Win32 only.
 SMTP =
 smtp_port =

 ; For Win32 only.
 ;sendmail_from =

 ; For Unix only.  You may supply arguments as well (default: sendmail
 -t -i).
 ;sendmail_path = C:\wamp\sendmail\sendmail.exe -t
 
 I don't mean to be rude, but what part of For Unix only confused you?
 
 You need to point the For Win32 only settings at a mail server on
 Windows. The error message pretty clearly states that it's trying to
 connect to the server specified in those settings.
 
 -Stut
 
Uh, yeah...  Then I thought, why not just use the  SMTP and smtp_port
settings.

-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() function HELP

2008-03-04 Thread Stut
Please include the list when replying. And please don't top-post, it  
makes proper quoting difficult.


On 4 Mar 2008, at 22:10, Sofia Jacob (CA) wrote:

Yes, I did that first and I get the error:

Warning: mail() [function.mail]: Failed to connect to mailserver at   
mail.yahoo.ca port 465, verify your SMTP and smtp_port setting  
in php.ini or  use ini_set() in C:\wamp\www\php_sandbox 
\user_auth_fns.php on line 170
(I should told you that before, sorry!!) and then I started to look  
at php web site and I found:


sendmail_path string
Where the sendmail program can be found, usually /usr/sbin/sendmail  
or /usr/lib/sendmail. configure does an honest attempt of locating  
this one for you and set a default, but if it fails, you can set it  
here.


Systems not using sendmail should set this directive to the sendmail  
wrapper/replacement their mail system offers, if any. For example, »  
Qmail users can normally set it to /var/qmail/bin/sendmail or/var/ 
qmail/bin/qmail-inject.


qmail-inject does not require any option to process mail correctly.

This directive works also under Windows. If set, smtp, smtp_port and  
sendmail_from are ignored and the specified command is executed.


My mistake, the comments in the INI file really should be changed to  
reflect that.


Given that your problem is that you haven't uncommented that line as  
Shawn said. Remove the ; from the start of that line, restart your we  
server and if the manual isn't lying it should work.


Incidentally, it probably didn't like the Yahoo settings you used  
because that port is for SMTP over SSL which PHP doesn't support.


-Stut

--
http://stut.net/


- Original Message -
From: Stut [EMAIL PROTECTED]
To: Sofia Jacob (CA) [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Tuesday, March 04, 2008 4:57 PM
Subject: Re: [PHP] mail() function HELP

 On 4 Mar 2008, at 21:18, Sofia Jacob (CA) wrote:
 I'm getting problems with the mail() function.

 ERROR:

 Warning: mail() [function.mail]: Failed to connect to mailserver at
  port 25, verify your SMTP and smtp_port setting in php.ini  
or
 use ini_set() in C:\wamp\www\php_sandbox\user_auth_fns.php on  
line 170



 I'm using Windows XP prof. and WAMP5 -server

 Here what I did:

 1) I download sendmail.zip from http://glob.com.au/sendmail/

 2) I unzip this in a folder on c:\wamp\sendmail

 3) I edited  PHP.INI file

 [mail function]
 ; For Win32 only.
 SMTP =
 smtp_port =

 ; For Win32 only.
 ;sendmail_from =

 ; For Unix only.  You may supply arguments as well (default:
 sendmail -t -i).
 ;sendmail_path = C:\wamp\sendmail\sendmail.exe -t

 I don't mean to be rude, but what part of For Unix only confused  
you?


 You need to point the For Win32 only settings at a mail server on
 Windows. The error message pretty clearly states that it's trying to
 connect to the server specified in those settings.

 -Stut

 --
 http://stut.net/



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() function HELP

2008-03-04 Thread Shawn McKenzie
Stut wrote:
 Please include the list when replying. And please don't top-post, it
 makes proper quoting difficult.
 
 On 4 Mar 2008, at 22:10, Sofia Jacob (CA) wrote:
 Yes, I did that first and I get the error:

 Warning: mail() [function.mail]: Failed to connect to mailserver at 
 mail.yahoo.ca port 465, verify your SMTP and smtp_port setting
 in php.ini or  use ini_set() in
 C:\wamp\www\php_sandbox\user_auth_fns.php on line 170
 (I should told you that before, sorry!!) and then I started to look at
 php web site and I found:

 sendmail_path string
 Where the sendmail program can be found, usually /usr/sbin/sendmail or
 /usr/lib/sendmail. configure does an honest attempt of locating this
 one for you and set a default, but if it fails, you can set it here.

 Systems not using sendmail should set this directive to the sendmail
 wrapper/replacement their mail system offers, if any. For example, »
 Qmail users can normally set it to /var/qmail/bin/sendmail
 or/var/qmail/bin/qmail-inject.

 qmail-inject does not require any option to process mail correctly.

 This directive works also under Windows. If set, smtp, smtp_port and
 sendmail_from are ignored and the specified command is executed.

 My mistake, the comments in the INI file really should be changed to
 reflect that.
 
 Given that your problem is that you haven't uncommented that line as
 Shawn said. Remove the ; from the start of that line, restart your we
 server and if the manual isn't lying it should work.
 
 Incidentally, it probably didn't like the Yahoo settings you used
 because that port is for SMTP over SSL which PHP doesn't support.
 
 -Stut
 
Correct on the yahoo.  I would tend to doubt that allow open relaying as
well.

-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP mail() function. Help please...

2001-11-18 Thread Anthony Ritter

I'm reading J.Meloni's tutorial on page 119 in Fast and Easy and she is
explaining using the PHP mail function.

There are two scripts for this example...

One is the .html file which lays out the form with input boxes, a textarea
box and a submit button.

It is:

HTML
HEAD
TITLE Simple Feedback Form /TITLE
/HEAD
BODY
FORM METHOD=post  ACTION=send_simpleform.php
P strong Your name: /strong br
INPUT TYPE=text  NAME=sender_name  SIZE=30/P
P strong Your e-mail address: /strong br
INPUT TYPE=text  NAME=sender_email  SIZE=30/P
P strong Your message: /strong br
TEXTAREA NAME =message COLS=30  ROWS=5  WRAP=virtual/TEXTAREA/P
P INPUT TYPE=submit  NAME= submit  VALUE=Send this form /P
/FORM
/BODY
/HTML


The next is the PHP script which reads as follows:

?
$msg=This e-mail is being sent from www site\n;
$msg.=Sender's name: \t$sender_name\n;
$msg.=Sender's e-mail:\t$sender_email\n;
$msg.=Message:\t$message\n\n;
$to=[EMAIL PROTECTED];
$subject=Website Feedback;
$mailheaders=From: My website \n;
$mailheaders.=Reply to: $sender_email\n\n;
mail($to,$subject,$msg,$mailheaders);
?
HTML
HEAD
TITLESimple Feedback Form/TITLE
/HEAD
BODY
H1The following e-mail has been sent:/H1
PstrongYour Name:/strongbr
?echo $sender_name;?
PstrongYour email address:/strongbr
?echo $sender_email;?
PstrongMessage:/strongbr
? echo $message; ?
/BODY
/HTML
..

Everytime I input a name, e-mail, and test blurb for the message box form
and hit submit, I get:

Warning: Failed to connect in C:\Program Files\Apache
Group\Apache\htdocs\send_simpleform.php
in line 10.

I have made the corrections in my php.ini file in the [mail function]
to read as follows:

SMTP=localhost
[EMAIL PROTECTED]

Please advise if anyone knows what I am doing wrong.

Thanking all in advance.
Tony Ritter










-- 
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] PHP mail() function. Help please...

2001-11-18 Thread Avdija A . Ahmedhodi

do you have sendmail or smtp configured properly. Yao should test that
first. Try to put instad of SMTP=localhost name of  some other server, taht
you can connect and send mail from.


- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 19. studeni 2001 01:07
Subject: [PHP] PHP mail() function. Help please...


 I'm reading J.Meloni's tutorial on page 119 in Fast and Easy and she is
 explaining using the PHP mail function.

 There are two scripts for this example...

 One is the .html file which lays out the form with input boxes, a textarea
 box and a submit button.

 It is:

 HTML
 HEAD
 TITLE Simple Feedback Form /TITLE
 /HEAD
 BODY
 FORM METHOD=post  ACTION=send_simpleform.php
 P strong Your name: /strong br
 INPUT TYPE=text  NAME=sender_name  SIZE=30/P
 P strong Your e-mail address: /strong br
 INPUT TYPE=text  NAME=sender_email  SIZE=30/P
 P strong Your message: /strong br
 TEXTAREA NAME =message COLS=30  ROWS=5  WRAP=virtual/TEXTAREA/P
 P INPUT TYPE=submit  NAME= submit  VALUE=Send this form /P
 /FORM
 /BODY
 /HTML
 

 The next is the PHP script which reads as follows:

 ?
 $msg=This e-mail is being sent from www site\n;
 $msg.=Sender's name: \t$sender_name\n;
 $msg.=Sender's e-mail:\t$sender_email\n;
 $msg.=Message:\t$message\n\n;
 $to=[EMAIL PROTECTED];
 $subject=Website Feedback;
 $mailheaders=From: My website \n;
 $mailheaders.=Reply to: $sender_email\n\n;
 mail($to,$subject,$msg,$mailheaders);
 ?
 HTML
 HEAD
 TITLESimple Feedback Form/TITLE
 /HEAD
 BODY
 H1The following e-mail has been sent:/H1
 PstrongYour Name:/strongbr
 ?echo $sender_name;?
 PstrongYour email address:/strongbr
 ?echo $sender_email;?
 PstrongMessage:/strongbr
 ? echo $message; ?
 /BODY
 /HTML
 ..

 Everytime I input a name, e-mail, and test blurb for the message box form
 and hit submit, I get:

 Warning: Failed to connect in C:\Program Files\Apache
 Group\Apache\htdocs\send_simpleform.php
 in line 10.

 I have made the corrections in my php.ini file in the [mail function]
 to read as follows:

 SMTP=localhost
 [EMAIL PROTECTED]

 Please advise if anyone knows what I am doing wrong.

 Thanking all in advance.
 Tony Ritter










 --
 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 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] PHP mail() function. Help please...

2001-11-18 Thread Anthony Ritter

Thank you!

It works fine.

Regards,
Tony




-- 
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]