Email not working

2,172 views
Skip to first unread message

ptsf...@gmail.com

unread,
Dec 21, 2014, 7:26:43 PM12/21/14
to easy-app...@googlegroups.com
I am trying to get my gmail account setup with easy appointments.  When I create an appointment after setting the smtp settings in the class.mailer.php file I get the following error in the error log:


[Sun Dec 21 18:09:28.046656 2014] [:error] [pid 3712:tid 1184] [client ::1:49357] SSL certificate problem, verify that the CA cert is OK. Retrying with the CA cert bundle from google-api-php-client., referer: http://localhost/test/
[Sun Dec 21 18:09:28.184664 2014] [:error] [pid 3712:tid 1184] [client ::1:49357] PHP Fatal error:  require_once(): Failed opening required 'class.smtp.php' (include_path='C:\\Bitnami\\wampstack-5.4.34-0\\apache2\\htdocs\\test\\application\\libraries\\external\\google-api-php-client;.;C:/Bitnami/wampstack-5.4.34-0/php/PEAR') in C:\\Bitnami\\wampstack-5.4.34-0\\apache2\\htdocs\\test\\application\\libraries\\external\\class.phpmailer.php on line 992, referer: http://localhost/test/

The cacerts.pem file exists in the google-api-php-client\io folder.  Not sure why this ssl cert error is coming up.

Has anyone gotten email to work?  If so, then how?

ptsf...@gmail.com

unread,
Dec 26, 2014, 10:18:02 PM12/26/14
to easy-app...@googlegroups.com
Anyone?

Tom Le

unread,
Jan 14, 2015, 10:20:26 AM1/14/15
to easy-app...@googlegroups.com
I got it to work if I put the values for smtp mailer, eg. host/username/port etc.... in the application/libraries/notification.php


        $smtphost = SystemConfiguration::$smtphost;
        $smtpport = SystemConfiguration::$smtpport;
        $smtpuserid = SystemConfiguration::$smtpuserid;
        $smtppassword = SystemConfiguration::$smtppassword;

$mailer = new PHPMailer();

The values for smtp are defined in the configuration.php   

//EMail setttings
    public static $smtphost = 'ssl://smtp.gmail.com';
    public static $smtpport = '465';
    public static $smtpuserid = 'myuse...@gmail.com';
    public static $smtppassword = 'mypassword';

Hope this helps

Jason Harris

unread,
May 15, 2015, 12:12:00 PM5/15/15
to easy-app...@googlegroups.com
Tom

So your saying put the following values in the notification.php file (AS THEY ARE SHOWN HERE)

  $smtphost = SystemConfiguration::$smtphost;
        $smtpport = SystemConfiguration::$smtpport;
        $smtpuserid = SystemConfiguration::$smtpuserid;
        $smtppassword = SystemConfiguration::$smtppassword;

$mailer = new PHPMailer();

Then in Configuration.php add the following with ACTUAL info

//EMail setttings
    public static $smtphost = 'mail.mydomain.com';
    public static $smtpport = '25';
    public static $smtpuserid = 'user.mydomain.com';
    public static $smtppassword = 'password'

I did exactly that and no change, still no emails;

Alex Tselegidis

unread,
May 16, 2015, 9:15:33 AM5/16/15
to easy-app...@googlegroups.com
For anyone having problems with sending emails this is not an Easy!Appointments problem. E!A uses the popular PHPMailer class and by default will execute the simple mail function of PHP which requires a mailing system CORRECTLY INSTALLED AND FULLY FUNCTIONAL at your server. You can of course configure the /application/libraries/notifications.php file and use your own method for sending the emails. 

To check if your server can send plain PHP mails use the following code snippet taken from the php.net website: 


<?php
$to      
'nob...@example.com';
$subject 'the subject';
$message 'hello';
$headers 'From: webm...@example.com"\r\n" .
    
'Reply-To: webm...@example.com"\r\n" .
    
'X-Mailer: PHP/' phpversion();

mail($to$subject$message$headers);
?>

Jason Harris

unread,
May 16, 2015, 11:04:39 AM5/16/15
to easy-app...@googlegroups.com
So Alex, your saying there is NO EXTERNAL CONFIG within easy app. No Files to edit. There are ZERO instructions about how to change and what files to modify anywhere! If I call my host and tell them it's "their fault" and they have tested the email, the next step is what files need to be changed and what settings,

I modified 4 separate files and saw no changes

Alex Tselegidis

unread,
May 17, 2015, 10:53:17 AM5/17/15
to easy-app...@googlegroups.com
I'm sorry Jason but I cannot point every exact code modification for each different problem. 

If there is a quick tweak I will always try to give a solution to users, but this is not possible every time. After all, E!A is an open source project and that means that users can navigate through code and do whatever they need to do.

I've made this community so that users can help each other and share their experiences.

Peter Crowley

unread,
Jun 29, 2015, 4:29:47 PM6/29/15
to easy-app...@googlegroups.com
I got Gmail to work.  Here's what I had to do:

In the file application/libraries/notification.php, there are several functions that send an email message.  Each method has the code "$mail = new PHPMailer();" somewhere in the function.  I found all these and after each one I added the following lines:

        $mail->Host = SystemConfiguration::$smtphost;
        $mail->Password = SystemConfiguration::$smtppassword;
        $mail->Port = SystemConfiguration::$smtpport;
        $mail->Username = SystemConfiguration::$smtpuserid;
        $mail->SMTPAuth = SystemConfiguration::$smtpauth;
        $mail->SMTPSecure = SystemConfiguration::$smtpsecure;
        $mail->IsSMTP();

In the file /configuration.php I added the following lines to the file after the Google API settings:

    //EMail setttings
    public static $smtphost = 'smtp.gmail.com';

    public static $smtpport = '465';
    public static $smtpuserid = 'yourem...@gmail.com';
    public static $smtppassword = 'youremailpassword';
    public static $smtpauth = true;
    public static $smtpsecure = "ssl";


I also needed to add "class.smtp.php" to the /application/libraries/external folder.  The source for this file can be found on PHPMailer Github.
Here is a link, just "save as ..." and put it in the "external" folder next to "class.phpmailer.php"
https://raw.githubusercontent.com/PHPMailer/PHPMailer/master/class.smtp.php


Sven Albert-Pedersen

unread,
Jun 30, 2015, 5:11:17 AM6/30/15
to easy-app...@googlegroups.com
Peter, this also works with other mail services/servers. Mine also uses port 465, authing and SSL/TLS.

At the moment in the virtualbox environment I set up, it takes a little to process the mail sending. Anyone else experiences that on a live server? Or is that because of the VB.

Cheers,
Sven

Oss Virt

unread,
Aug 4, 2015, 11:10:27 AM8/4/15
to Easy!Appointments - Support Group
I too am having trouble getting any emails to send. I've followed Peter Crowley's directions above and still nothing. The odd thing is I don't get any errors appear in error.log either. Could anyone suggest what I might look at to troubleshoot the issue?

Socoliuc Michel

unread,
Aug 15, 2015, 3:04:47 AM8/15/15
to Easy!Appointments - Support Group
for an unknown reason email notification was working without your tweak but the mails were considered as spam.

With your configuration the emails are not send. Any idea how to enable logging in order to see what is not working? maybe a timeout which is too small?

Socoliuc Michel

unread,
Aug 18, 2015, 11:59:08 AM8/18/15
to Easy!Appointments - Support Group
I think for those who have a shared server you should use IsMail() and not IsSMTP().

For me it seems that it is working now with the previous modifications (I have to check a couple of things but it seems to work and now no more SPAM issues)

Stefano Mollo

unread,
Aug 1, 2016, 12:40:29 AM8/1/16
to Easy!Appointments - Support Group
Hi All;

like many of you, I did hit a roadblock when I had to deal with sending email notifications.

In my case, I am using a Gmail account to send email notifications.

Alex made it clear that NO modifications are needed in any E!A file, in order to make it send emails. It does however need a working mailing subsystem.

Based on my experience so far, I strongly suggest to setup properly the mail subsystem and then install E!A, and not the other way around.

Although it can be done the other way around, it is more logical to set up the mail subsystem first and the E!A, as E!A relies on the mail subsystem and not viceversa.

I am no Linux Guru, but I do know a thing or two. In the case of Ubuntu 14.04 LTS, a working mailing subsystem is "mail" which include Postfix: I have followed the instructions in here ..


... and got it to work. 

Before getting it to work however, I had to unlock Gmail's captcha by visiting this page: https://www.google.com/accounts/DisplayUnlockCaptcha

Mail error massages are always a great guide to troubleshoot the system and are located in 

/var/log/mail.log


It works for me; for the record, I am using a virtual server instance on Linode.

Cheers, Stefano.

The Psychotherapy

unread,
Nov 30, 2016, 5:27:17 PM11/30/16
to Easy!Appointments - Support Group
What I discover is that the email are sent both to me and the patient if I book the appointment from the program, but if I enter in backend and I make an appointment I get an error, unexpected line 127.
Odd
Reply all
Reply to author
Forward
0 new messages