When you use the mail function, you must give the first argument. The 'to'
is not in the headers
Try this, it should work
-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Envoy� : samedi 1 novembre 2003 22:11
� : [EMAIL PROTECTED]
Objet : [PHP] mail function error - win32
I try to send from my pc a mail with the function mail(), but if doesn't
work, I have tried several time, but nothing, I don't know what could be,
because the same script work well in a remote host.
in my php.ini, I put:
[mail function]
; For Win32 only.
SMTP = mail.serbis.com
I also put
[mail function]
; For Win32 only.
SMTP = mail.webdevfm.com
I also put (the local mail server that I have):
[mail function]
; For Win32 only.
SMTP = ojpp.myftp.org
--------------------------------
the errors are the follow:
** First error - When the mailserver (ojpp.myftp.org - localhost) is
deactivated
Warning: mail(): Failed to connect to mailserver at "ojpp.myftp.org" port
25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
in d:\htdocs\ojpp\ojppresume\contact.php on line 118
Warning: mail(): Failed to connect to mailserver at "ojpp.myftp.org" port
25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
in d:\htdocs\ojpp\ojppresume\contact.php on line 138
** Code in line 118
$validar = mail('', $materia, $cuerpo,
"To: $para\n" .
"From: test <$email>\n" .
"MIME-Version: 1.0\n" .
"Content-type: text/html; charset=iso-8859-1");
** Code in line 138
$validar = mail('', $materia, $cuerpo,
"To: $para\n" .
"From: Webdevfm <$email>\n" .
"MIME-Version: 1.0\n" .
"Content-type: text/html; charset=iso-8859-1");
** Second error - When the mailserver (mail.webdevfm.com) is actived
Warning: mail(): SMTP server response: 503 valid RCPT command must precede
DATA in d:\htdocs\ojpp\ojppresume\contact.php on line 118
** Third error - When the mailserver (mail.serbis.com) is actived
Warning: mail(): SMTP server response: 503 must have sender and recipient
first in d:\htdocs\ojpp\ojppresume\contact.php on line 118
Error enviando correo electr�nico a [EMAIL PROTECTED]
** fourth error - When the mailserver (ojpp.myftp.org - localhost) is
actived
Warning: mail(): SMTP server response: 503 Bad sequence of commands in
d:\htdocs\ojpp\ojppresume\contact.php on line 118
---
thanks, for the help.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php