Problems with mail function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sellam@vintagetech.com

    #1

    Problems with mail function

    I just installed to a new server and am trying to iron out certain
    bugs.

    Right now I have a problem with the mail function. I always get a
    FALSE return value when I call the mail function.

    This same code was working on my old server.

    I've done research and spent hours trying to figure out why it won't
    work to no avail. Here's what I know:

    1. No errors are appearing in the PHP error log
    2. The sendmail path is properly configured in php.ini
    3. If I use the exec function to manually call sendmail it works
    4. My PHP version is 4.3.10

    What else do you need to know to help me?

    Any and all sane suggestions appreciated.

  • MaKroZ

    #2
    Re: Problems with mail function

    On Thu, 12 Jan 2006 18:37:39 -0800, sellam wrote:
    [color=blue]
    > I just installed to a new server and am trying to iron out certain
    > bugs.
    >
    > Right now I have a problem with the mail function. I always get a
    > FALSE return value when I call the mail function.
    >
    > This same code was working on my old server.
    >
    > I've done research and spent hours trying to figure out why it won't
    > work to no avail. Here's what I know:
    >
    > 1. No errors are appearing in the PHP error log
    > 2. The sendmail path is properly configured in php.ini
    > 3. If I use the exec function to manually call sendmail it works
    > 4. My PHP version is 4.3.10
    >
    > What else do you need to know to help me?
    >
    > Any and all sane suggestions appreciated.[/color]

    It looks like sendmail accepts the message as valid but can't send
    it for some reason. Try to check sendmail's logs.

    --
    nn = MaKroZ =
    (oo) My bookmarks:
    | | http://www.theisplist.com
    |/\| http://www.tenpieces.com

    Comment

    • Geoff Berrow

      #3
      Re: Problems with mail function

      Message-ID: <1137119859.227 762.195030@g43g 2000cwa.googleg roups.com> from
      sellam@vintaget ech.com contained the following:
      [color=blue]
      >Right now I have a problem with the mail function. I always get a
      >FALSE return value when I call the mail function.[/color]

      I don't have a solution but if it's any consolation, I'm working on the
      same problem...

      --
      Geoff Berrow (put thecat out to email)
      It's only Usenet, no one dies.
      My opinions, not the committee's, mine.
      Simple RFDs http://www.ckdog.co.uk/rfdmaker/

      Comment

      • Geoff Berrow

        #4
        Re: Problems with mail function

        Message-ID: <1137119859.227 762.195030@g43g 2000cwa.googleg roups.com> from
        sellam@vintaget ech.com contained the following:
        [color=blue]
        >Any and all sane suggestions appreciated.[/color]



        is all I can find at the moment
        --
        Geoff Berrow (put thecat out to email)
        It's only Usenet, no one dies.
        My opinions, not the committee's, mine.
        Simple RFDs http://www.ckdog.co.uk/rfdmaker/

        Comment

        • Berimor

          #5
          Re: Problems with mail function

          On Fri, 13 Jan 2006 04:37:39 +0200, <sellam@vintage tech.com> wrote:
          [color=blue]
          > This same code was working on my old server.[/color]


          Is it local server?
          If so - have you reconfigured php.ini?
          Make sure you have access to smtp mail server.




          ---
          Exact Meta Search | Major Search Engine http://exactsearcher.com
          Web Design Essex | Multimedia | Printing http://nextwave.co.uk

          Comment

          • sellam@vintagetech.com

            #6
            Re: Problems with mail function

            Thanks to all for your replies so far.

            I should add that the e-mail is not being sent. The mail function
            returns false and no e-mail is received at the receiving mailbox.

            My web server and mail server are on the same machine. On my old
            server I was running sendmail, but now I'm running Postfix with the
            sendmail wrapper. I doubt this has anything to do with it but you
            never know. I've observed more stupid things before.

            As I mentioned, as far as I can tell (and I've check and re-checked
            multiple times) configuration is correct across all configuration files
            (Apache2, PHP, Postfix, etc.)

            I was hoping a g00r00 who has been through this before would find my
            plea and take pity on me.

            I'll do some further investigating (including checking the Postfix
            logs) and post an update.

            Sellam

            Comment

            • rawkensawken@gmail.com

              #7
              Re: Problems with mail function

              Ok, I figured it out. It was a simple fix: all the work was in
              figuring out what was wrong :(

              My /var/log/mail.err file was showing thus:

              Jan 19 10:54:47 vintagetech postfix/sendmail[15252]: fatal: Recipient
              addresses must be specified on the command line or via the -t option

              In your php.ini configuration file, make sure the sendmail command has
              the proper options specified (and check to make sure the path is
              correct while you're at it):

              ; For Unix only. You may supply arguments as well (default: "sendmail
              -t -i").
              sendmail_path = /usr/sbin/sendmail -t -i

              (Remember to restart Apache once you've made any configuration
              changes.)

              The standard SuSE install for some reason did not set up this item
              correctly (I had to add the command line options "-t -i").

              Everything works...hooray!

              Now I have to see about this e-mail injection issue. Judging from my
              log, it looks like the fucking spammers have found me >:(

              Comment

              Working...