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

  1. #1

    Default Mail

    I cannot get mail() to work any idea's
    I get a server error.
    Windows 2000 the SMTP port is 25.
    No default values have being changed from the original PHP installation.

    In it's simplest form
    mail("joecool@example.com", "My Subject", "Test");
    Gives the error as do more complicated scripts that I copied.
    Thanks
    Sean


    Sean Guest

  2. Similar Questions and Discussions

    1. Mail component to retrieve mail from Hotmail, Yahoo, gmail..etc?
      I am not sure these web based mail support POP3 or IMAP4. Is there any mail component out there that can retrieve mail from these services? --...
    2. #25357 [Com]: Mail() function is loosing cahracters when sending mail
      ID: 25357 Comment by: dj_canard at yahoo dot com Reported By: pjsmith at microtech dot co dot gg Status: Bogus...
    3. #25357 [NEW]: Mail() function is loosing cahracters when sending mail
      From: pjsmith at microtech dot co dot gg Operating system: Windows 2003, IIS, ISAPI PHP version: 4.3.3 PHP Bug Type: *Mail...
    4. #25195 [NEW]: Warning: mail(): Could not execute mail delivery program ...
      From: mhawkins at ukeu dot com Operating system: Solaris 8 PHP version: Irrelevant PHP Bug Type: Mail related Bug...
    5. the script hangs up when i try to send mail with attachments using MAIL::Sender...???
      As said in the topic... when i try to send an e-mail message using Mail::Sender the script hangs up before execution of $sender ->...
  3. #2

    Default RE: [PHP] Mail

    Do you have an SMTP server installed on your machine? If not, add one to IIS
    (probably the simplest way to do it in Win2k).

    -M

    -----Original Message-----
    From: Sean [mailto:SC12345@Comcast.net]
    Sent: Friday, August 08, 2003 11:11 PM
    To: [email]php-general@lists.php.net[/email]
    Subject: [PHP] Mail


    I cannot get mail() to work any idea's
    I get a server error.
    Windows 2000 the SMTP port is 25.
    No default values have being changed from the original PHP installation.

    In it's simplest form
    mail("joecool@example.com", "My Subject", "Test");
    Gives the error as do more complicated scripts that I copied. Thanks Sean



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




    Mike Brum Guest

  4. #3

    Default Re: [PHP] Mail

    Thanks for the quick response. 1 and 2 work 3 does not giving "unable to
    relay for...."
    I had slight doubts about what to use for youremail@yourdomain I used my
    normal email address.

    1.. Type helo me and press ENTER. The output resembles the following:
    250 OK
    2.. Type mail from:email@domain.com and press ENTER. The output
    resembles the following:
    250 OK - mail from <email@domain.com>
    3.. Type rcpt to:youremail@yourdomain.com and press ENTER. The output
    resembles the following:
    250 OK - Recipient <youremail@yourdomain.com>
    Hope you can help
    Thanks
    Sean

    "John W. Holmes" <holmes072000@charter.net> wrote in message
    news:3F346DF3.2090408@charter.net...
    > Sean wrote:
    >
    > > I cannot get mail() to work any idea's
    > > I get a server error.
    > > Windows 2000 the SMTP port is 25.
    > > No default values have being changed from the original PHP installation.
    > >
    > > In it's simplest form
    > > mail("joecool@example.com", "My Subject", "Test");
    > > Gives the error as do more complicated scripts that I copied.
    > > Thanks
    > > Sean
    >
    > Follow the guidelines at the following URL to see where the error lies.
    >
    > [url]http://support.microsoft.com/?kbid=286421[/url]
    >
    > --
    > ---John Holmes...
    >
    > Amazon Wishlist: [url]www.amazon.com/o/registry/3BEXC84AB3A5E/[/url]
    >
    > PHP|Architect: A magazine for PHP Professionals – [url]www.phparch.com[/url]
    >
    >
    >
    >

    Sean Guest

  5. #4

    Default Re: [PHP] Mail

    I have searched various other places for an answer but have found none. I
    imagine that the problem is caused by something simple that I am doing wrong
    but if not this will be going on a Linux server when it works is there
    another commonly used way of sending mail that the web hosting service will
    not complain about setting up.
    Also I don't think there should be any major difference between php script
    for Windows or Linux is that right?
    Thanks
    Sean


    "Sean" <SC12345@Comcast.net> wrote in message
    news:20030809115609.12988.qmail@pb1.pair.com...
    > Thanks for the quick response. 1 and 2 work 3 does not giving "unable to
    > relay for...."
    > I had slight doubts about what to use for youremail@yourdomain I used my
    > normal email address.
    >
    > 1.. Type helo me and press ENTER. The output resembles the following:
    > 250 OK
    > 2.. Type mail from:email@domain.com and press ENTER. The output
    > resembles the following:
    > 250 OK - mail from <email@domain.com>
    > 3.. Type rcpt to:youremail@yourdomain.com and press ENTER. The output
    > resembles the following:
    > 250 OK - Recipient <youremail@yourdomain.com>
    > Hope you can help
    > Thanks
    > Sean
    >
    > "John W. Holmes" <holmes072000@charter.net> wrote in message
    > news:3F346DF3.2090408@charter.net...
    > > Sean wrote:
    > >
    > > > I cannot get mail() to work any idea's
    > > > I get a server error.
    > > > Windows 2000 the SMTP port is 25.
    > > > No default values have being changed from the original PHP
    installation.
    > > >
    > > > In it's simplest form
    > > > mail("joecool@example.com", "My Subject", "Test");
    > > > Gives the error as do more complicated scripts that I copied.
    > > > Thanks
    > > > Sean
    > >
    > > Follow the guidelines at the following URL to see where the error lies.
    > >
    > > [url]http://support.microsoft.com/?kbid=286421[/url]
    > >
    > > --
    > > ---John Holmes...
    > >
    > > Amazon Wishlist: [url]www.amazon.com/o/registry/3BEXC84AB3A5E/[/url]
    > >
    > > PHP|Architect: A magazine for PHP Professionals - [url]www.phparch.com[/url]
    > >
    > >
    > >
    > >
    >
    >

    Sean Guest

  6. #5

    Default Re: [PHP] Mail

    Got it if anyone else has trouble.
    In the IIS SMTP properties go to the Access Tab.
    Click the Relay button at the bottom and change the selection from "Only the
    list below" to "All except the list below" I have no idea if this is a
    security risk it works that's all I care about for now.

    Sean


    Sean Guest

  7. #6

    Default Re: [PHP] Mail

    * Thus wrote Sean (SC12345@Comcast.net):
    > Got it if anyone else has trouble.
    > In the IIS SMTP properties go to the Access Tab.
    > Click the Relay button at the bottom and change the selection from "Only the
    > list below" to "All except the list below" I have no idea if this is a
    > security risk it works that's all I care about for now.
    Um, if I read that right you just set your mail server as an open
    relay. This is bad.

    I would strongly encourge you to put it back on 'Only the list
    below' and add your own hostname to the list instead.

    Curt
    --
    "I used to think I was indecisive, but now I'm not so sure."
    Curt Zirzow Guest

  8. #7

    Default RE: [PHP] Mail

    To expand on Curt's suggestion (which is a very good one), add your local
    network IP (192.168.#.#), the external IP the machine has (if any) and
    localhost (127.0.0.1) to the "Only the list below" box.

    If you have to add any other machines in your network to relay mail through
    this server, try to only add their internal IP's, and relay the mail
    internally. Not only will you get better performance (speeds across an
    internal network are generally faster than having to be routed over the
    internet), but you'll have a better chance of making sure that those that
    are attempting to connect to your mail server are who they say they are.

    -Mike

    -----Original Message-----
    From: Curt Zirzow [mailto:curt@zirzow.dyndns.org]
    Sent: Sunday, August 10, 2003 11:50 PM
    To: [email]php-general@lists.php.net[/email]
    Subject: Re: [PHP] Mail


    * Thus wrote Sean (SC12345@Comcast.net):
    > Got it if anyone else has trouble.
    > In the IIS SMTP properties go to the Access Tab.
    > Click the Relay button at the bottom and change the selection from
    > "Only the list below" to "All except the list below" I have no idea if
    > this is a security risk it works that's all I care about for now.
    Um, if I read that right you just set your mail server as an open relay.
    This is bad.

    I would strongly encourge you to put it back on 'Only the list below' and
    add your own hostname to the list instead.

    Curt
    --
    "I used to think I was indecisive, but now I'm not so sure."

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




    Mike Brum Guest

  9. #8

    Default Re: [PHP] Mail

    Point taken and thanks for responding. I am using the computer to test the
    script which I will then upload to a hosting service. I am connected behind
    a router which assigns the IP for the computer also the cable company
    changes the IP for the cable modem now and again so I feel quite safe.
    In fact if any one responds to this answer I would be interested to know if
    hackers could get past all that, like everyone else I don't like the thought
    of someone snooping around my computer.
    Thanks
    Sean



    "Mike Brum" <php@crazyted.com> wrote in message
    news:030801c35fbf$5497e9a0$c802a8c0@Transient...
    > To expand on Curt's suggestion (which is a very good one), add your local
    > network IP (192.168.#.#), the external IP the machine has (if any) and
    > localhost (127.0.0.1) to the "Only the list below" box.
    >
    > If you have to add any other machines in your network to relay mail
    through
    > this server, try to only add their internal IP's, and relay the mail
    > internally. Not only will you get better performance (speeds across an
    > internal network are generally faster than having to be routed over the
    > internet), but you'll have a better chance of making sure that those that
    > are attempting to connect to your mail server are who they say they are.
    >
    > -Mike
    >
    > -----Original Message-----
    > From: Curt Zirzow [mailto:curt@zirzow.dyndns.org]
    > Sent: Sunday, August 10, 2003 11:50 PM
    > To: [email]php-general@lists.php.net[/email]
    > Subject: Re: [PHP] Mail
    >
    >
    > * Thus wrote Sean (SC12345@Comcast.net):
    > > Got it if anyone else has trouble.
    > > In the IIS SMTP properties go to the Access Tab.
    > > Click the Relay button at the bottom and change the selection from
    > > "Only the list below" to "All except the list below" I have no idea if
    > > this is a security risk it works that's all I care about for now.
    >
    > Um, if I read that right you just set your mail server as an open relay.
    > This is bad.
    >
    > I would strongly encourge you to put it back on 'Only the list below' and
    > add your own hostname to the list instead.
    >
    > Curt
    > --
    > "I used to think I was indecisive, but now I'm not so sure."
    >
    > --
    > PHP General Mailing List (http://www.php.net/)
    > To unsubscribe, visit: http://www.php.net/unsub.php
    >
    >
    >
    >

    Sean 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