Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a LAMP localhost server setup for some development and I want to test out if my code is working. Some of the tests involve checking if the correct emails are sent out by the code at the correct time.

For this, my code needs to be able to send emails. It does not need to receive emails back.

I have LAMP running on Debian. How do I setup setup sending emails on Debian? Apparently it already has something called exim instead of sendmail?

share|improve this question
 
So you really want an outgoing MTA which can accept a mail message locally and deliver it; not necessarily sendmail specifically? –  Michael Kjörling Aug 1 at 19:41

1 Answer

Exim provides "real sendmail" look alike program called sendmail. The look alike supports most common options used when sending using "real sendmail".

So: Your PHP code may send via "sendmail" program (default on unix).

Most likely you Exim autoconfigured itself. You may send a test message to verify it. Use the command below for test (use valid recipient email):

(echo Subject: test; echo) | /usr/sbin/sendmail -v -i [email protected]
share|improve this answer
 
The default config only allows send mail locally. –  jordanm Aug 1 at 21:40
 
AFAIK It is not default in many (linux) distributions. Which distribution do you use? –  Andrzej A. Filip Aug 2 at 6:36
 
It's the default in Debian, which is what the OP is using. –  jordanm Aug 2 at 14:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.