Menu

email setup

Help
Docaltmed
2010-01-11
2013-04-06
  • Docaltmed

    Docaltmed - 2010-01-11

    The email wiki refers to several parameters in the globals.php file that need to be modified, specifically:

        $GLOBALS - email outgoing server host/ip
        $GLOBALS - email outgoing server port
        $GLOBALS - if to use ssl
        $GLOBALS - local host name used to send email
        $GLOBALS - outgoing server user
        $GLOBALS - outgoing server password

    In searching the forums, there seemed to be one post which suggested that the globals.php file had been modified to reflect the wiki instructions, but I'm not seeing it. I am using 3.1 with patch #5 installed.

    What is the correct format for adding these parameters? Should I just, for example, add:

    $GLOBALS (as well as the other lines) to the bottom of the globals.php file? (smtp.myhost.com being my smtp server)

    thanks in advance for the help,

    Avery

     
  • wooyi

    wooyi - 2010-01-11

    To add variables for the smtp:
    $GLOBALS = 'smtp.broadband.rogers.com';
    $GLOBALS = '25';
    $GLOBALS = 'wooyi@rogers.com';
    $GLOBALS = 'password';

    I am looking at this feature at the moment because I'm integrating an automatic phone reminder service to OpenEMR using a similar approach to the email reminders.

    I did not find the Admin interface for the Notifications as described in the Wiki, but you can configure this by manually updating the automatic_notification table in the database to update the sender's email and the email message title, body you want sent out. I got it to work after I updated this table.

     
  • Docaltmed

    Docaltmed - 2010-01-12

    Thanks for your help! I modified globals.php. Now I'm getting an error message that there is trouble communicating with the email server. I'll look at ports and firewalls first, before I try anything esoteric.

     
  • wooyi

    wooyi - 2010-01-12

    If it's not your firewall, it could be your ISPs. ISPs routinely close port 25 to avoid people sending out spam. You can use telnet to test your connection:

    telnet mailserver.domain.com 25

     
  • Docaltmed

    Docaltmed - 2010-01-12

    Another good call, wooyi. port was locked off, so I checked with my host, found I could use port 587. That worked with telnet, but I'm still getting the same response from OpenEMR. It looks like this:

    xl('Could not send email due to a server problem, ','','
    ). 5 . xl(' emails not sent','','','
    ')

     
  • aperez

    aperez - 2010-01-12

    Hi

    If using gmail (587 is common for them) you need to import their certficate.  Try this How to for sending email through GMAIL.  I have used it to send email via the command line or scripts.

    http://www.marksanborn.net/linux/send-mail-postfix-through-gmails-smtp-on-a-ubuntu-lts-server/

    Thanks

     
  • wooyi

    wooyi - 2010-01-13

    btw, after looking at the cron scripts in the sms_email_reminder module and there are some significant bugs in there. The function that queries for appointments from the calender, for example, is not correct and will result in weird behavior. It does not calculate the "forward" date correctly.

     
  • MD Support

    MD Support - 2011-04-20

    Recently upgraded one practice to 4.0 which broke the email process.  Here is the Cron Daemon's message when running cron_email_notification.php :

    Warning: include_once(../../interface/globals.php): failed to open stream: No such file or directory in /var/www/openemr/modules/sms_email_reminder/cron_email_notification.php on line 18

    Warning: include_once(): Failed opening '../../interface/globals.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/openemr/modules/sms_email_reminder/cron_email_notification.php on line 18

    Fatal error: Call to undefined function sqlFetchArray() in /var/www/openemr/modules/sms_email_reminder/cron_functions.php on line 349

    Is there a patch / fix or did we miss a configuration step?

    Thx.

     
  • venkat ambati

    venkat ambati - 2012-04-29

    wooyi,

    I am trying to make cron_email_notification.php working,

    when i run it command line like
    php /var/www/openemr/modules/sms_email_reminder/cron_email_notification.php -e

    I am getting this error

    PHP Notice:  Undefined index: HTTP_HOST in /var/www/openemr/interface/globals.php on line 127
    Site ID '' contains invalid characters.

    can you tell me if you faced such problem if so how did you fix it.

    I am running openemr 4.1.0 (9) on ubuntu.

    Thank you
    venkat

     
  • Brady Miller

    Brady Miller - 2012-05-01

    Hi,

    This is an issue I have noted when trying to do command line scripts within OpenEMR since the multisite feature was added. Will need to either bring in the site parameter into this script (either as a parameter or hard-code it) and set it equal to $_SESSION near the beginning (before the call to globals.php) of the script.

    -brady
    OpenEMR

     
  • Louis Ruiz

    Louis Ruiz - 2012-08-16

    has anyone figured out the fix for the email not working after upgrade to 4.1 ?

     
  • Brady Miller

    Brady Miller - 2012-08-18

    Hi,
    Somebody needs to incorporate the fix outlined in above post (post 10) to get these scripts to work when called via command line. Bringing the site_id in as a parameter seems like the best way.
    -brady
    OpenEMR

     
  • Louis Ruiz

    Louis Ruiz - 2012-08-18

    Thank you for the reply Brady ..

     
  • Brady Miller

    Brady Miller - 2012-08-18

    Hi,

    To provide a bit more details, try placing the following code above the include_once("../../interface/globals.php"); line:
    $_GET = 'default';

    This will hard-code the site in. Note it will break if using multisite module or if using something other than default at openemr/sites/* . The proper way to do this (so it works in both command line mode and php mode) is to collect a parameter (and only if the parameter exists, then set it to that).

    -brady
    OpenEMR

     
  • Louis Ruiz

    Louis Ruiz - 2012-08-21

    Thank you Brady for pointing me in the right direction. My email is now working :)
    -Louis-

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.