RE: [PHP] mail function error - win32

From: Julien Wadin (php_at_julienwadin.be)
Date: 11/01/03


To: <orlandopozo@icnet.com.ve>
Date: Sat, 1 Nov 2003 22:17:08 +0100

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 : orlandopozo@icnet.com.ve [mailto:orlandopozo@icnet.com.ve]
Envoyé : samedi 1 novembre 2003 22:11
À : php-general@lists.php.net
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 ojpp@ojpp.myftp.org

** 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.


Relevant Pages

  • mail function error - win32
    ... ; For Win32 only. ... Warning: mail: SMTP server response: 503 valid RCPT command must precede ...
    (php.general)
  • Sendmail not sending WAS email app i can use
    ... > the html doc has a simple name, email, and comment box ... > as long as it is saved as a .php file When I do this, ... ; For Win32 only. ...
    (Fedora)
  • Re: Exchange vs PHP
    ... ; For Win32 only. ... I don´t know how connect in that port. ... Sanford Whiteman, Chief Technologist ...
    (microsoft.public.inetserver.iis.smtp_nntp)
  • PHP MAIL on Apache and Windows Server 2003
    ... I am at my wits end here, I am trying to get PHP's mail function send ... We are running the SMTP sever under Windows and are running PHP ... ; For Win32 only. ... echo "Email Has Been Sent ."; ...
    (php.general)
  • sending mail from localhost
    ... I usually use a phpmailer class but am creating something from scratch. ... ; For Win32 only. ...
    (php.general)