LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to configure ssmtp (https://www.linuxquestions.org/questions/linux-software-2/how-to-configure-ssmtp-642743/)

ryy705 05-16-2008 04:08 PM

How to configure ssmtp
 
Hello,
I just installed ssmtp on my laptop which is running ubuntu. I would like to configure it in such a way that it would allow me to send out mails using the php mail() function. I just want to build my web page on my computer before uploading it to a server. So, I just need to send mail I don't need to receive them.

I understand that I need to cofigure the /etc/ssmtp/ssmtp.conf file.
But exactly do I do I have to do with it. Many thanks in advance.


Code:

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=ryy

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail.google.com

# Where will the mail seem to come from?
rewriteDomain=rewrite.com

# The full hostname
#hostname=ryy

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES


rikijpn 05-29-2008 08:20 AM

ssmtp.conf
 
Well, I don't know about php, on http://www.w3schools.com/PHP/php_ref_mail.asp says it just needs a working mail system, so if you need to know only how to write the ssmtp.conf file, then I can help you with that. ssmtp will allow you to send mail directly from your computer through an external smtp server.
A working ssmtp.conf file:

root=postmaster #you probably won't need to change it
mailhub=where.the.mail.goes.com #eg. stmp.someserver.com
hostname=what.goes.after.@.inyourmail #eg. domain.com
AuthUser=your.login.name #for the stmp account
AuthPass=your.password.for.it
AuthMethod=LOGIN # or CRAM-MD5

(ssmtp supports only these two authentication methods, check more at the manuals)


All times are GMT -5. The time now is 07:29 AM.