473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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. =)

Sep 14 '05 #1
6 5139
tencip wrote:
So, we're avoiding using sendmail for obvious security reasons on a
highly secured FreeBSD box.


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

Regards,
Erwin Moller
Sep 15 '05 #2
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?

Sep 15 '05 #3
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

Sep 16 '05 #4
On 16 Sep 2005 00:17:44 -0700, Ki*************@gmx.net wrote:
i'm not the UNIX specialist,


Or a newsgroup one!

Learn netiquette include quotes to what you are replying to.
Sep 16 '05 #5
On 15 Sep 2005 09:43:03 -0700, tencip wrote:

Any ideas?

Obviously you haven't

What are you replying to? Quote the relevant information.
Sep 16 '05 #6
Hello,

on 09/14/2005 06:04 PM tencip said the following:
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.
It sounds a bit paronoid, but...

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?


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.

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

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

http://www.phpclasses.org/sasl
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Sep 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a...
1
by: Paul Robson | last post by:
I'm just tinkering with PHP and learning the basics ; all well and good so far, except I can't get mail() to work. I'm running Apache 2 & PHP 4.3.9, and ssmtp on Gentoo. ssmtp is set up...
4
by: Tom Petersen | last post by:
Ok, I'm 99.9999999999999999999% sure there haven't been any code changes, since the date stamps of the code are older than any email 'failures' The email piece quit working using the mail.send. ...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
42
by: scorpion53061 | last post by:
Is there a registry setting that I can read in vb.net for windows platforms that will give me the default mail server for the computer (e.g. mail.charter.net)
9
by: shror | last post by:
hi every body, i have a problem which is when i was checking my mail() form it work fine but the problem is that the form configuration is not set correctly, in details: the from var is not...
9
by: nobrow | last post by:
I cannot get php to send an email. This works: $ mail -s "My Subject" nobrow@gmail.com My Message ^D Cc: But this doesnt:
6
by: nextpulse | last post by:
On Fedora, using php5. The mail() function returns a success - but the mail itself is not actually sent. How do I go about debugging this? Do I need to do this at the linux command level to ensure...
11
by: Taras_96 | last post by:
Hi all, The PHP manual states that: "The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.