To download support materials, please select your product from the list below. You will automatically be shown all downloads for that product, including extensions, brochures, sales presenters and technotes.

  • 1. Select your section, category and chosen product.
  • 2. Click on the Manual, brochure, sales presenter or technote of your choice.
  • 3. Take careful note of any applicable instructions, especially for extensions.
  • 4. Download the file to your hard drive.
Knowledge Base

Knowledge Base

How to Send Email from localhost

Categories: Magento 1
Date Created: 22 Apr 2016
Last Updated: 3 May 2021

On localhost using windows

First of all, Xampp setup is needed. In Xampp window, you can check Config button →  choose PHP as demonstrated below:
sendmail_from =
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

And don’ forget to leave this comment


(Here remember to add “;” at the beginning)

Suppose Xampp default installation is located at C:\Xampp, you only need to open file C:\xampp\sendmail\sendmail.ini and also fix some given lines:

Finally, let’s restart Xampp services by clicking Stop →  Start. That’s not so complicating , is it? Now try to run php script and send email to see the results.

On localhost using ubuntu

Suppose localhost has been already installed Apache2, Mysql and PHP5

  • Install SSMTP: Go to terminal and type sudo apt-get install ssmtp. Then choose Y(yes) and click enter if confirmation is needed.
  • SSTMP configuration: Still in terminal, please continue to sudo gedit /etc/ssmtp/ssmtp.conf. When gedit window opens, you must add and fix following lines:

In which <YOUR-EMAIL> and <YOUR-PASSWORD> are the information to sign in your email. Mailhub might be another stmp server in case you do not use Gmail. For the next step, just need to save and close gedit window to return to terminal.

  • Reset configuration sendmail_path for php: In terminal, you continue to type sudo gedit /etc/php5/apache2/php.ini. When gedit opens, it is the time to look up for the keyword sendmail_path then edit as sendmail_path = /usr/bin/msmtp -t
  • Save and close php.ini file. Again, from terminal you type this line to restart apache2: sudo service apache2 restart

So, when you get here, the configuration is completed. Now run php script to send email and you will be satisfied with the results.

Support Enquiry

Support Enquiry

If you have a question or require technical support for a Magespacex hosting or extensions you have purchased, please fill out the form below and a member of our support team will contact you shortly.

  • * Required Fields