Skip to content

Commit

Permalink
Migrated phpmailer to vendor via composer, tested by Arnab.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wakie87 authored and bradymiller committed Aug 17, 2016
1 parent 4e48b20 commit 6bff59d
Show file tree
Hide file tree
Showing 82 changed files with 14,014 additions and 3,237 deletions.
4 changes: 3 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<delete dir="${dir.vendor}/adodb/adodb-php/docs" verbose="true"/>

<delete dir="${dir.vendor}/smarty/smarty/demo" verbose="true"/>

<delete dir="${dir.vendor}/phpmailer/phpmailer/examples" verbose="true"/>
<delete dir="${dir.vendor}/phpmailer/phpmailer/test" verbose="true"/>
<delete dir="${dir.vendor}/phpmailer/phpmailer/docs" verbose="true"/>
</target>
</project>
1 change: 0 additions & 1 deletion ccr/createCCR.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

require_once(dirname(__FILE__) . "/../interface/globals.php");
require_once(dirname(__FILE__) . "/../library/sql-ccr.inc");
require_once(dirname(__FILE__) . "/../library/classes/class.phpmailer.php");
require_once(dirname(__FILE__) . "/uuid.php");
require_once(dirname(__FILE__) . "/transmitCCD.php");
require_once(dirname(__FILE__) . "/../custom/code_types.inc.php");
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"require": {

"smarty/smarty": "2.6.29",
"adodb/adodb-php": "5.20.2"
"adodb/adodb-php": "5.20.2",
"phpmailer/phpmailer": "5.2"

},
"require-dev": {
Expand Down
64 changes: 62 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions controllers/C_Prescription.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,9 +801,7 @@ function _email_prescription($p,$email) {
$this->assign("process_result","Email could not be sent, the address supplied: '$email' was empty or invalid.");
return;
}
require($GLOBALS['fileroot'] . "/library/classes/class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage("en",$GLOBALS['fileroot'] . "/library/" );
//this is a temporary config item until the rest of the per practice billing settings make their way in
$mail->From = $GLOBALS['practice_return_email_path'];
$mail->FromName = $p->provider->get_name_display();
Expand Down
2 changes: 0 additions & 2 deletions interface/drugs/dispense_drug.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
require_once("$srcdir/acl.inc");
require_once("drugs.inc.php");
require_once("$srcdir/options.inc.php");
require_once($GLOBALS['fileroot'] . "/library/classes/class.phpmailer.php");
require_once($GLOBALS['fileroot'] . "/library/classes/class.ezpdf.php");
require_once("$srcdir/htmlspecialchars.inc.php");

function send_email($subject, $body) {
$recipient = $GLOBALS['practice_return_email_path'];
if (empty($recipient)) return;
$mail = new PHPMailer();
$mail->SetLanguage("en", $GLOBALS['fileroot'] . "/library/" );
$mail->From = $recipient;
$mail->FromName = 'In-House Pharmacy';
$mail->isMail();
Expand Down
2 changes: 0 additions & 2 deletions interface/drugs/drugs.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
$substitute_array = array('', xl('Allowed'), xl('Not Allowed'));

function send_drug_email($subject, $body) {
require_once ($GLOBALS['srcdir'] . "/classes/class.phpmailer.php");
$recipient = $GLOBALS['practice_return_email_path'];
if (empty($recipient)) return;
$mail = new PHPMailer();
$mail->SetLanguage("en", $GLOBALS['fileroot'] . "/library/" );
$mail->From = $recipient;
$mail->FromName = 'In-House Pharmacy';
$mail->isMail();
Expand Down
1 change: 0 additions & 1 deletion interface/usergroup/usergroup_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
$row = sqlFetchArray($res);
$uname=$row['username'];
$mail = new MyMailer();
$mail->SetLanguage("en",$GLOBALS['fileroot'] . "/library/" );
$mail->From = "admin@".$mail_id[1].".".$mail_id[2];
$mail->FromName = "Administrator OpenEMR";
$text_body = "Hello Security Admin,\n\n The Emergency Login user ".$uname.
Expand Down
Loading

0 comments on commit 6bff59d

Please sign in to comment.