Jump to content

Configure PHP on Linux to send mails by an external SMTP


javiribera

Recommended Posts

Right now, I use the mail() php function to send mails by using a localhost mail server named postconf. But I wanna use an external SMTP server (gmail) cause I don't want to have a mail server running all the time. My server's on a linux machine.

What do i have to set up? ???

  • 1 month later...

Hello,

I am on the same boat.  I have lamp installed but I can't send mails using php.  I don't need a fully functional mail server, just something to build/test webpages with before uploading them to the server.  I installed ssmtp but I can't figure out how to use it.  Man pages are not helping.  Following shows whats in ssmtp.conf. What should I modify?  I have been at for several days.  Please help me if possible.

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

# 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

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

# 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.