Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 31114  / 2 Years ago, thu, september 8, 2022, 1:43:06

I have installed php, mySQL, postfix and sendmail and have set up a simple email script on my local host server. mail() returns 1 (TRUE) when I send an e-mail, however the email does not arrive at the destination.



Installation



The mail functions are part of the PHP core. There is no installation needed to use these functions.



Requirements



For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file.



Runtime Configuration
The behavior of the mail functions is affected by settings in the php.ini file.



Mail configuration options:



Name            Default     Description                                         Changeable
sendmail_path NULL Unix systems only: Specifies where the sendmail
program can be found (usually /usr/sbin/sendmail
or /usr/lib/sendmail) PHP_INI_SYSTEM


I found it at /usr/lib/sendmail however, I can not find the configuration file, which is where I assume my problem is, as I have not told anything which server I am using to send my mail through.



If anyone can help me I would be grateful.


More From » php

 Answers
1

You should not have both Postfix and Sendmail installed at the same time. Postfix is a replacement for Sendmail.



So remove Sendmail (because Postfix is easier to use):



sudo apt-get remove sendmail


Then you should reconfigure Postfix.



 sudo dpkg-reconfigure postfix


There is a very good guide here: https://help.ubuntu.com/community/Postfix



This will probably solve your problem.


[#30518] Thursday, September 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fenddy

Total Points: 361
Total Questions: 103
Total Answers: 113

Location: Turkmenistan
Member since Sun, Aug 2, 2020
4 Years ago
fenddy questions
Tue, Nov 22, 22, 10:11, 1 Year ago
Tue, Sep 27, 22, 09:16, 2 Years ago
Wed, Dec 28, 22, 13:09, 1 Year ago
Fri, Jun 18, 21, 14:04, 3 Years ago
;