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

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default 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=my.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
    Paolo Guest

  2. Similar Questions and Discussions

    1. #21653 [Com]: Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed
      ID: 21653 Comment by: laudanp at yahoo dot com Reported By: support at hostcolor dot com Status: Closed Bug...
    2. Failed to connect to mail server: Unknown error.
      Hi all, I've a perl script that does the sending of email using MIME..however i keep getting this error when i run the script: Failed to connect...
    3. #24785 [Opn->Fbk]: Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed
      ID: 24785 Updated by: wez@php.net Reported By: laudanp at yahoo dot com -Status: Open +Status: ...
    4. #24785 [NEW]: Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed
      From: laudanp at yahoo dot com Operating system: Redhat 7.3 PHP version: 4CVS-2003-07-23 (stable) PHP Bug Type: Sockets...
    5. #21653 [Csd->Opn]: Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed
      ID: 21653 User updated by: support at hostcolor dot com Reported By: support at hostcolor dot com -Status: Closed...
  3. #2

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

    Paolo wrote:
    > changed in the following way the values in php.ini file :
    >
    > SMTP=localhost;
    Do you have a SMTP server installed on your computer?
    Try changing to SMTP=smtp.myprovider.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.
    Pedro Guest

  4. #3

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

    "Paolo" <pscola@tiscalinet.it> wrote in message
    news:07ldnvcc12levf2v96629neufamko6gje3@4ax.com...
    > 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=my.real.address@my.provider.com
    >
    > Do you have any hints or suggestions ?
    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


    Paulus Magnus Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139