Backend Service

This commit is contained in:
2019-03-09 23:59:29 +00:00
parent ebb72d4d1d
commit 5b531a7b7b
4 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ mailsend:
server = "smtp.gmail.com"; server = "smtp.gmail.com";
domain = "mermsemr.com"; domain = "mermsemr.com";
user = "savvy@chiefsoft.com"; user = "savvy@chiefsoft.com";
pass = "may12002"; pass = "may12002!";
name = "MERMS EHR"; name = "MERMS EHR";
}; };
+3 -4
View File
@@ -117,18 +117,17 @@ int SMTP2( const char * _server, const char * _from, char * _to, char * _body, c
} }
// Google // Google
/*
snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -d %s -name '%s' +cc +bcc -v -starttls -auth-plain -user %s -pass %s -sub '%s' -M '%s'", snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -d %s -name '%s' +cc +bcc -v -starttls -auth-plain -user %s -pass %s -sub '%s' -M '%s'",
_server, _from, _to, _domain, _name, _user, _pass, subject, body != NULL ? body : _body ); _server, _from, _to, _domain, _name, _user, _pass, subject, body != NULL ? body : _body );
*//* /*
// Virtualmail // Virtualmail
snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -d %s -name '%s' +cc +bcc -v -port 25 -auth-plain -user %s -pass %s -sub '%s' -M '%s'", snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -d %s -name '%s' +cc +bcc -v -port 25 -auth-plain -user %s -pass %s -sub '%s' -M '%s'",
_server, _from, _to, _domain, _name, _user, _pass, subject, body != NULL ? body : _body ); _server, _from, _to, _domain, _name, _user, _pass, subject, body != NULL ? body : _body );
*/ *//*
// GoDaddy // GoDaddy
snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -d %s -name '%s' +cc +bcc -v -port 80 -auth-plain -user %s -pass %s -sub '%s' -M '%s'", snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -d %s -name '%s' +cc +bcc -v -port 80 -auth-plain -user %s -pass %s -sub '%s' -M '%s'",
_server, _from, _to, _domain, _name, _user, _pass, subject, body != NULL ? body : _body ); _server, _from, _to, _domain, _name, _user, _pass, subject, body != NULL ? body : _body );
*/
logfmt( FLOG_MAX, "Calling MAILSEND: %s", name); logfmt( FLOG_MAX, "Calling MAILSEND: %s", name);
FILE * p = popen( name, "r" ); FILE * p = popen( name, "r" );
+1 -1
View File
@@ -43,7 +43,7 @@ long MemberLogin(CVars in, CVars &out) {
out["stauts"] = "OK"; out["stauts"] = "OK";
/*LOAD THE SESSION INTO OUT now */ /*LOAD THE SESSION INTO OUT now */
load_db_record(out, "SELECT session FROM members_session WHERE member_id=%lu ORDER BY id DESC LIMIT 1", out["member_id"].Long()); load_db_record(out, "SELECT session FROM members_session WHERE member_id=%lu ORDER BY id DESC LIMIT 1", out["member_id"].Long());
//Email-bad member_email_calls(in["action"].Long(), out, out); member_email_calls(in["action"].Long(), out, out);
//=============================================================================================================================== //===============================================================================================================================
pgsql_query("UPDATE members SET last_login = now() WHERE id = %lu", out["member_id"].Long()); pgsql_query("UPDATE members SET last_login = now() WHERE id = %lu", out["member_id"].Long());
// account_email(ACCOUNT_LOGIN_ALERT,out,out); // ALERT CUSTOMER OF LOGIN // account_email(ACCOUNT_LOGIN_ALERT,out,out); // ALERT CUSTOMER OF LOGIN
-3
View File
@@ -5,7 +5,6 @@ THIS IS THE USER ENTRY POINT API
require '../../backend.php'; require '../../backend.php';
require '../backend_defines.php'; require '../backend_defines.php';
//var_dump($mermsemr->cfgReadChar("database.host")); //var_dump($mermsemr->cfgReadChar("database.host"));
//phpinfo();
$endpoints = array( $endpoints = array(
'createuser' => array('POST'), 'createuser' => array('POST'),
@@ -139,10 +138,8 @@ switch ( $in["action"] ) {
// calling the backend // calling the backend
$out["internal_return"]= $mermsemr->mermsemr_api($in,$out); $out["internal_return"]= $mermsemr->mermsemr_api($in,$out);
header("HTTP/1.1 200 OK"); header("HTTP/1.1 200 OK");
header("Status: 200 OK"); header("Status: 200 OK");
//$out = array_merge($in, $out); // DEBUG
echo json_encode(processOutJson($in, $out)); echo json_encode(processOutJson($in, $out));
exit(); exit();