smtp server in ubuntu

Hello,

- Ubuntu installed

I'm trying to test the php function mail with this simple code:

<?php
mail("<email>","Testing Mail Function","This is a test message to test the mailing capabilities");
?>

In the apache log I'm getting the following error:
sh: /usr/sbin/sendmail: not found


I guess I don't have any SMTP sever installed... What do I need to installed and how?

Thanks in advance

lulonAsked:
Who is Participating?
 
Daemon_ByteCommented:
sudo apt-get install sendmail    

That should do it :)
0
 
hernst42Commented:
Try to install the postfix or exim package for a MTA
0
 
manishmestryCommented:
Try install Fetchmail & sendmail packages... in UBuntu
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
lulonAuthor Commented:
sudo apt-get install sendmail

That worked, thanks!

Could you please tell me the way to stop/start the SMTP server? where are the logs? how is it called? Basic administration...
0
 
Daemon_ByteCommented:
To control it you want

sudo /etc/init.d/sendmail start
sudo /etc/init.d/sendmail stop
sudo /etc/init.d/sendmail restart

I'm not sure that sendmail does logs.
0
 
TobiasHolmCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.