Mail Function Setup

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Mail Function Setup

Postby trymeout » 07. May 2019 05:01

How will one on Linux get the mail function to work to be able to create email files (EML) on their computer by using the PHP mail() function? When I was on Windows I used XAMPP and the Test Mail Server Tool.
trymeout
 
Posts: 14
Joined: 20. March 2018 16:02
XAMPP version: 3.3.2
Operating System: Windows 10

Re: Mail Function Setup

Postby Nobbie » 07. May 2019 14:21

Nobbie
 
Posts: 11043
Joined: 09. March 2008 13:04

Re: Mail Function Setup

Postby trymeout » 28. June 2019 19:21

I finally figured it out after a month! This is how it is done

1. Create a folder in your Documents named XAMPP Emails
2. Open the terminal and enter the following command

Code: Select all
sudo chmod 777 "/home/USERNAME/Documents/XAMPP Emails/"


3. Open the php.ini file that is located in your /opt/lampp/etc directory
4. Press CTRL+F and then type "mail function"
5. Under the [mail function] remove comment from sendmail_path
6. Set sendmail_path to
Code: Select all
sendmail_path = "cat > /home/USERNAME/Documents/XAMPP\ Emails/`date '+%Y-%m-%d - %H-%M-%S'`.eml"
BUT MAKE SURE TO REPLACE USERNAME with your own username
7. If Apache is running, restart it
trymeout
 
Posts: 14
Joined: 20. March 2018 16:02
XAMPP version: 3.3.2
Operating System: Windows 10


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 6 guests