Openemer+ Postfix + Hylafax setting questions

(albanyeye) #1

Need some help with eye-form
I have been using Ray’s eye-mag form and loving it! It is really fantastic.

there is a function that allowws the email of faxes to a faxserver and then the fax gets sent to the referring physician.
The fax number is in the format 7701234567@fax.mydomian
I have a working hylafax and postfix install on the same server as the openemr (on my testing virtualbox machine).

  1. I can send faxes
  2. I can send email from command line to 7701234567@fax.mydomian and the faxes arrive as expected to fax # 7701234567
  3. I send a fax in a php file as so:
<?php ini_set( 'display_errors', 1 ); error_reporting( E_ALL ); $from = "fax.rangarajeye"; $to = "7701234567@fax.mydomain"; $subject = "PHP Mail Test script"; $message = "This is a test to check the PHP Mail functionality"; $headers = "From:" . $from; mail($to,$subject,$message, $headers); echo "Test email sent"; ?>

A fax arrives without problems.

  1. However, no matter what I put into the the Globals I cannot get
    taskman_functions.php to send the email.
    Lines 174-217
    I have checked the mail logs, hylafax log, apache log. No errors anywhere.

My globals are as follows

SMTP ServerHostname : localhost
Port: 25
SMTP User for Auth : fax
SMTP Password for Auth:

Hylafax server: localhost

(albanyeye) #2

Ok Im getting something in the log now…but what that is I dont know:expressionless:

Feb 25 15:53:58 openemr postfix/smtpd[30323]: connect from localhost[]
Feb 25 15:53:58 openemr postfix/smtpd[30323]: SSL_accept error from localhost[]: -1
Feb 25 15:53:58 openemr postfix/smtpd[30323]: warning: TLS library problem: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:…/ssl/record/rec_layer_s3.c:1399:SSL alert number 48:
Feb 25 15:53:58 openemr postfix/smtpd[30323]: lost connection after STARTTLS from localhost[]
Feb 25 15:53:58 openemr postfix/smtpd[30323]: disconnect from localhost[] ehlo=1 starttls=0/1 commands=1/2

(R Magauran) #3

Is this on lines 69-70 of taskman.php:

//for 5.0.1

and are those files/directories present on your server?

(albanyeye) #4

No Ray I dont have that line. It is missing

I do have those directories however.

my taskman.php looks exactly like this.
Line 69-70 are blank

openemr/taskman.php at master · openemr/openemr · GitHub

I will fill in this line and test it today

(albanyeye) #5

Ha! Success…almost perfect
Ok …this is what I did.

  1. To use PHPMail
    added that line
    SMTP Server Hostname : Localhost
    Email Transport Method: PHPMAIL

  2. If you want to use SMTP
    (take out all the TLS stuff in in postfix and just secure your server to only accept mail from localhost)
    SMTP Server Hostname : Localhost
    Email Transport Method: SMTP
    SMTP Server Port Number: 25
    SMTP User for Authentication: (blank)
    SMTP Password for Authentication: (blank)

  3. And finally:
    need to change line 194 from
    $to_email= $to_fax."@".$GLOBALS[‘hylafax_server’];
    $to_email= $to_fax."@fax.".$GLOBALS[‘hylafax_server’];

so as to make the email address fit the format This then gets sent to hylafax.

(albanyeye) #6

Another question I have Ray is the coverpage generated.
This is what shows up.
How do I change it

(albanyeye) #7

Ok solved the above issue of extra pages being sent. I am posting the solution here for anyone else wanting to use this feature.
In taskman_functions.php comment out the lines about coverpage and an allow phpmail to send an email with empty body and only the PDF attachment.
What Ray has done with this feature is fantastic! I can send out a fax to the referring physician so fast and they appreciate it immensely!!
Thanks again

// $cover_page = " “.$filepath.’/’.$filename;
$mail->AddReplyTo($email_sender, $from_name);
$mail->SetFrom($email_sender, $from_name);
$mail->AddAddress($to_email); //, $to_name);
$mail->Subject = $from_fax;
// $mail->MsgHTML(” Fax Central openEMR ;
// $mail->IsHTML(true);
// $mail->AltBody = $cover_page;
$mail->AllowEmpty = true; //allow for empty message body to be sent