mail(): ' Warning: Failed to Connect in ... on line ...'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paolo

    mail(): ' Warning: Failed to Connect in ... on line ...'

    Hi everybody,
    I'm a newbie using PHP4 and Apache 1.3 on Win98.

    When I launch a script just having this instruction:

    mail ("test.address@ example.com", "My Subject", "My message");

    I got this annoying message:

    Warning: Failed to Connect in myscript.php on line ...

    Of course the e-mail address provided is a real one; I have also
    changed in the following way the values in php.ini file :

    SMTP=localhost;
    sendmail_from=m y.real.address@ my.provider.com

    Do you have any hints or suggestions ?

    Any help will be very appreciated, thank you in advance.
    Kind regards,
    Paolo
  • Pedro

    #2
    Re: mail(): ' Warning: Failed to Connect in ... on line ...'

    Paolo wrote:[color=blue]
    > changed in the following way the values in php.ini file :
    >
    > SMTP=localhost;[/color]

    Do you have a SMTP server installed on your computer?
    Try changing to SMTP=smtp.mypro vider.com

    --
    I have a spam filter working.
    To mail me include "urkxvq" (with or without the quotes)
    in the subject line, or your mail will be ruthlessly discarded.

    Comment

    • Paulus Magnus

      #3
      Re: mail(): ' Warning: Failed to Connect in ... on line ...'

      "Paolo" <pscola@tiscali net.it> wrote in message
      news:07ldnvcc12 levf2v96629neuf amko6gje3@4ax.c om...[color=blue]
      > Hi everybody,
      > I'm a newbie using PHP4 and Apache 1.3 on Win98.
      >
      > When I launch a script just having this instruction:
      >
      > mail ("test.address@ example.com", "My Subject", "My message");
      >
      > I got this annoying message:
      >
      > Warning: Failed to Connect in myscript.php on line ...
      >
      > Of course the e-mail address provided is a real one; I have also
      > changed in the following way the values in php.ini file :
      >
      > SMTP=localhost;
      > sendmail_from=m y.real.address@ my.provider.com
      >
      > Do you have any hints or suggestions ?[/color]

      You need to run a mail server on your machine to receive the outgoing email.
      I assume this is a development environment as you're running Windows 98. I
      use a product called PostCast Server which is a freebie, I'm not sure if it
      works on Win98 though.

      Pablo


      Comment

      Working...