Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I accidentally removed the perl package instead of the pear from my Ubuntu server and for some reason it uninstalled many packages, like php, mysql, etc... Why is that? does those packages depend on perl?

My question is that when I uninstalled this package, mail stopped working. I installed everything again but I can't get mail to work again. I am using the PHP function.

Is there a package I need to install? If so which is it?

Many thanks

share|improve this question

migrated from stackoverflow.com Jul 4 '11 at 11:36

This question came from our site for professional and enthusiast programmers.

1  
You need to install an MTA (Exim, Postfix, Sendmail, whatever) and to configure the relayhost and servername (at least)... it is a Serverfault question though. Hence the close vote –  Eineki Jul 4 '11 at 11:24
2  
I love questions with no code and does not work as description. They are are very stimulating for the mind. –  Álvaro G. Vicario Jul 4 '11 at 11:32
    
What's the result of echo test mail | mail my@email.address -s"test mail"? –  Andy Jul 4 '11 at 11:52
    
@Andy: there is no result –  Chris Jul 4 '11 at 12:01
    
@Chris try searchings the logs for your MTA for your email address (ask Google if unsure) and see if the mail even made it into the queue/attempted delivery etc - only once it works from the command line return to debugging it from PHP. –  Andy Jul 4 '11 at 12:24
add comment

1 Answer

up vote 0 down vote accepted

Most likely, you removed the mail transport agent, too, and did not reinstall it. Try installing a package like "sendmail".

Background: the mail function just passes the mail to an underlying mail transport agent. If there is none, it will fail. Most/many/some of these mail transport agents rely on perl.

share|improve this answer
    
I tried reinstalling postfix but it is still not working. Any ideas? –  Chris Jul 4 '11 at 11:47
    
Here's one: Stop assuming that everyone else here is telepathic and giving us problem reports such as "it is still not working", "I can't get mail to work", and "there is no result". Report your problems properly. –  JdeBP Jul 4 '11 at 15:35
add comment

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.