Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running LAMP on my Ubuntu 10.04 Desktop linux and using it as a development machine.

I need to send emails from my php pages, but it seems that the sendmail php command needs sendmail installed on the laptop.

I understand I can install sendmail by sudo aptitude install sendmail, but don't know how to configure it as after installing it and restarting apache2, sendmail from php still does not work and returns no errors at all.

I am assuming sendmail needs to be configured after installing it, before it can be used in php.

Therefore, my question is, how do I install and configure sendmail on ubuntu 10.04 so I can use sendmail via cli at least.

share|improve this question
up vote 0 down vote accepted

hope this will help help

I haven't tried sendmail, i use postfix.

share|improve this answer
why use postfix over sendmail? can I send emails from php using postfix? would it be easier to install and configure postfix? – oshirowanen May 6 '11 at 11:09
yes, its very easy. – dsaint May 9 '11 at 14:12

Your Answer


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.