X

Send E-mail From Localhost on Ubuntu with PHP


Send E-mail with Localhost on Ubuntu with PHP. The Ubuntu Operating Environment is good for web developers. so mainly you require sometime to send email from localhost. Also you might be necessary to check the email features from localhost development time.

Here I have a small tutorial, Which will help you to send email from localhost. you can configure it very well.

send-mail-from-localhost-ubuntu

Just follow the steps.

  1. Install ssmtp through terminal
sudo apt-get install ssmtp

2.  You have to configure your gmail here to use.  So you have to edit the configuration file. You can edit it by accessing the direct path  or you can go with shell mode.

3. Here I used  my gmail credentials in the:

gksu gedit /etc/ssmtp/ssmtp.conf

Just edit it.

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

# 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
mailhub=smtp.gmail.com:587

AuthUser=****@gmail.com
AuthPass=****
UseTLS=YES
UseSTARTTLS=YES

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

# The full hostname
#hostname=MyMediaServer.home
hostname=****@gmail.com

# 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

That’s it. It will help you to send mail from your Ubuntu localhost by accessing your gmail.

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, OpenCart Theme Development, PHP, HTML, CSS, jQuery, Bootstrap development and content SEO.

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar

Subscribe E-mail Updates

Subscribe to our email newsletter.

 

Advertisement

Category Posts