Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My knowledge of mail delivery systems is near ZERO I have stand alone PC running UBUNTU 12.04 (no other OP systems) I am developing a web system with PHP and want to send an email to users that have registered. I have installed POSTFIX and set it up to work with GMAIL (I hope correctly) My little test program appears to send the email but it does not arrive at destination. Is there some special code for SMTP or something else needed to install? Please can you give me step by step instructions of what must be installed.

Simple explanations will be appreciated so I know why and for what I am doing these things. This is my test program which shows OK Thanks

share|improve this question
add comment

1 Answer

You can use the package ssmtp to send emails. I am using this package to send me reports of my daily backups.

To install:

sudo apt-get install ssmtp

You will need to edit the files /etc/ssmtp/ssmtp.conf and /etc/ssmtp/revaliases to use your email account.

To test if it works, try to send yourself an email:

ssmtp <your email address>

Then type your message, press enter, and finally press ctrl+d.

For detailed instructions on setting up ssmtp, check out this article.

share|improve this answer
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.