Topic: Email not working in FA

Guys, needs some enlightment.
So i setup ssmtp and edit the ssmtp.conf as well as sendmail path in php.ini to be /usr/sbin/ssmtp -t but email funtion in FA is not working
I test with order confirmation, email address is set on the customer contact for order confirmation, then when i click the button "Email this order" there is no notification if the mail is successfull or not

what i did was
1. test the ssmtp function through terminal, it did work 

mail.log wrote:

Sep 27 15:53:27 vps661017 sSMTP[8719]: Sent mail for fa@kbn-indo.com (221 srv76.niagahoster.com closing connection) uid=0 username=root outbytes=363
Sep 27 16:09:21 vps661017 sSMTP[8968]: Creating SSL connection to host
Sep 27 16:09:21 vps661017 sSMTP[8968]: SSL connection using ECDHE_RSA_AES_256_GCM_SHA384
Sep 27 16:09:28 vps661017 sSMTP[8968]: Sent mail for fa@kbn-indo.com (221 srv76.niagahoster.com closing connection) uid=0 username=root outbytes=359
Sep 27 16:11:55 vps661017 sSMTP[9048]: Creating SSL connection to host
Sep 27 16:11:55 vps661017 sSMTP[9048]: SSL connection using ECDHE_RSA_AES_256_GCM_SHA384

2. i create this php file to test sending from a php

code wrote:

<?php
    ini_set( 'display_errors', 1 );
    error_reporting( E_ALL );
    $from = "test@hostinger-tutorials.com";
    $to = "test@gmail.com";
    $subject = "Checking PHP mail";
    $message = "PHP mail works just fine";
    $headers = "From:" . $from;
    mail($to,$subject,$message, $headers);
    echo "The email message was sent.";
?>

it did successfully sent

mail.log wrote:

Sep 27 16:12:02 vps661017 sSMTP[9048]: Sent mail for fa@kbn-indo.com (221 srv76.niagahoster.com closing connection) uid=33 username=www-data outbytes=387
Sep 27 16:14:20 vps661017 sSMTP[9077]: Creating SSL connection to host
Sep 27 16:14:21 vps661017 sSMTP[9077]: SSL connection using ECDHE_RSA_AES_256_GCM_SHA384
Sep 27 16:14:25 vps661017 sSMTP[9077]: Sent mail for fa@kbn-indo.com (221 srv76.niagahoster.com closing connection) uid=33 username=www-data outbytes=387
[27-Sep-2019 16:15:57 Asia/Jakarta] mail() on [/var/www/html/FA/testmail.php:9]: To: andi.budiman@gmail.com -- Headers: From:fa@kbn-indo.com -- Subject: Checking PHP mail
Sep 27 16:15:57 vps661017 sSMTP[9090]: Creating SSL connection to host
Sep 27 16:15:57 vps661017 sSMTP[9090]: SSL connection using ECDHE_RSA_AES_256_GCM_SHA384
Sep 27 16:16:02 vps661017 sSMTP[9090]: Sent mail for fa@kbn-indo.com (221 srv76.niagahoster.com closing connection) uid=33 username=www-data outbytes=387

But everytime i test on FA, mail.log did not show anything, it was like the mail function just not run
Please help.

Regards,
SiKumbang

Re: Email not working in FA

There is no smtp configured to send emails on prompt time.  If you wish to add smtp feature you have to change the default main function with phpmailer to deliver mails immediately.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Email not working in FA

Try using this module FA SMTP Mailer

www.boxygen.pk

4 (edited by sikumbang 10/01/2019 04:31:52 am)

Re: Email not working in FA

Hi Boxygen,

After PHPMailer is set, SMTP info is input on the mail sending setup then i test to send order confirmation, but still the same as before, there is no notification if the mail is successfully sent or not, and i did not receive the email.

can you help me test my smtp on your server to see if it can send or not?

Regards,
SiKumbang

Re: Email not working in FA

https://gist.github.com/Dreyer/2958946
https://conetix.com.au/support/simple-php-mail-test/

Re: Email not working in FA

Test sending mail from PHP works fine but the problem is in FA itself, so finally i reinstall FA, then problem is solved, dont know what causing it to break, but thanks a lot for all the help.

Regards,
SiKumbang.

7 (edited by seahawk 01/13/2020 07:58:09 pm)

Re: Email not working in FA

Hi all

I am sitting with the same issue on the new VPS that I moved to.

On the shared server the normal email functions was fine most of the time, but on the VPS the "from"  line use to read: myemail@mycompanydomain.coza

On the VPS it is the same exept it has the "cpanelname@servername.coza on behalf of Compny name <myemail@mycompanydomain.coza>

According to the hosting provider, the VPS does not have cloud linux installed, since it costs extra, where shred server have this isntalled, and thus the reason for the above problem.

I have now trying to install https://github.com/serbanconstantinescu/fa_mail_phpmailer and will see what it does.

I have been using PHPlist (Mailing list) for a long time and they have implemented and option to use the normal php's mail() function or you could change the smtp settings in the config file using phpmailer6 , maybe you could have a look at it.

My deliverability is better with the smtp function through my mail server.

Will see if the serban idea will work and report back

Wynand

Re: Email not working in FA

I have tried to get it to work but without any success.

Setup menu does not display at all, I could activate the setup in Install/Activate extensions and allocated it to the company Activated section, but nothing show in the setup tab.

I was told to try the following by the hosting provider in the php ini file:
sendmail_path = /usr/sbin/sendmail -t -i -f 'email@mydomain.coza'

I do not know if this will work however?

Wynand

9 (edited by rafat 01/14/2020 07:45:54 am)

Re: Email not working in FA

Hi @seahawk

Maybe you missed one of the following steps as described in the installation instructions:

1.copy the files into '/modules' directory
2.download PHPMailer-5.2.14 into '/modules/mail/includes' directory
3.replace existing '/reporting/includes/mail.class.inc' with the new provided one
4.activate module in FA

5. go to "Setup" -> "Mail Sending Setup" and fill in the data.

that's it