mail() and ssmtp not working

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

    mail() and ssmtp not working

    So, we're avoiding using sendmail for obvious security reasons on a
    highly secured FreeBSD box. However, we need to get mail out of that
    box to an SMTP relay server. So, we heard about ssmtp, which is a
    sendmail emulator.

    Well, this works great from the command line, can send emails to the
    relay server just fine. however, we haven't been able to get it to
    work with the basic PHP mail() function.

    Can anyone tell me if they've gotten ssmtp to work with PHP's mail()
    function?

    I've been told that it can't be done. =)

  • Erwin Moller

    #2
    Re: mail() and ssmtp not working

    tencip wrote:
    [color=blue]
    > So, we're avoiding using sendmail for obvious security reasons on a
    > highly secured FreeBSD box.[/color]

    Hi, just curious.
    What excactly is the problem with sendmail?

    Regards,
    Erwin Moller

    Comment

    • tencip

      #3
      Re: mail() and ssmtp not working

      Hi Erwin,

      Actually, not sure exactly what the problem is. It's an order from a
      security level above me...don't want us using Sendmail. I've gotten
      ssmtp to work fine from the command line, but need to get it working in
      conjunction with PHP. So far, even if i change the php.ini file to
      point to the /usr/sbin/ssmtp, i can't get mail to send.

      Any ideas?

      Comment

      • Kirsten.Schulte@gmx.net

        #4
        Re: mail() and ssmtp not working

        Hi,

        i'm not the UNIX specialist, but i think PHP under UNIX supports only
        sendmail.
        If you want to use an other programm you need a wrapper.
        ZEND PHP Certification Guid say:

        "If you are using an alternative to sendmail, it must provide a
        sendmail wrapper. A sendmail wrapper is a drop-in replacement for the
        sendmail command-line program. It must accept the -t and -i
        command-line switches at the very least."

        So i think you need a wrapper for ssmtp.

        -Kirsten

        Comment

        • Obvious

          #5
          Re: mail() and ssmtp not working

          On 16 Sep 2005 00:17:44 -0700, Kirsten.Schulte @gmx.net wrote:
          [color=blue]
          > i'm not the UNIX specialist,[/color]

          Or a newsgroup one!

          Learn netiquette include quotes to what you are replying to.

          Comment

          • Obvious

            #6
            Re: mail() and ssmtp not working

            On 15 Sep 2005 09:43:03 -0700, tencip wrote:

            [color=blue]
            > Any ideas?[/color]
            Obviously you haven't

            What are you replying to? Quote the relevant information.

            Comment

            • Manuel Lemos

              #7
              Re: mail() and ssmtp not working

              Hello,

              on 09/14/2005 06:04 PM tencip said the following:[color=blue]
              > So, we're avoiding using sendmail for obvious security reasons on a
              > highly secured FreeBSD box. However, we need to get mail out of that
              > box to an SMTP relay server. So, we heard about ssmtp, which is a
              > sendmail emulator.[/color]

              It sounds a bit paronoid, but...

              [color=blue]
              > Well, this works great from the command line, can send emails to the
              > relay server just fine. however, we haven't been able to get it to
              > work with the basic PHP mail() function.
              >
              > Can anyone tell me if they've gotten ssmtp to work with PHP's mail()
              > function?[/color]

              You may want to try this class that comes with a wrapper function named
              smtp_mail() that emulates the mail() function but lets you send messages
              either relaying to another SMTP server, or send directly to the
              destination SMTP server.



              You also need this:



              If you need to authenticate to relay, you also need this:




              --

              Regards,
              Manuel Lemos

              PHP Classes - Free ready to use OOP components written in PHP
              Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials


              PHP Reviews - Reviews of PHP books and other products


              Metastorage - Data object relational mapping layer generator

              Comment

              Working...