summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-07-15 16:56:38 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-07-15 16:56:38 +0200
commitd49b789348315be677e66593eaca43e0e399d3da (patch)
treeb29917fc50f3145e89b4f938076bc6353887585d /lib
parent55754939009a51da1ed8350d372d8d6f7e7768a5 (diff)
parent160e701fbf4d87e9673114f0dd51c6705e180475 (diff)
downloadnextcloud-server-d49b789348315be677e66593eaca43e0e399d3da.tar.gz
nextcloud-server-d49b789348315be677e66593eaca43e0e399d3da.zip
Merge branch 'master' into calendar_import
Diffstat (limited to 'lib')
-rwxr-xr-xlib/app.php2
-rw-r--r--lib/mail.php56
-rw-r--r--lib/setup.php2
3 files changed, 31 insertions, 29 deletions
diff --git a/lib/app.php b/lib/app.php
index 4c2c43ec26b..caf8bd82521 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -608,7 +608,7 @@ class OC_App{
//set remote/public handelers
$appData=self::getAppInfo($appid);
foreach($appData['remote'] as $name=>$path){
- OCP\CONFIG::setAppValue('core', 'remote_'.$name, $path);
+ OCP\CONFIG::setAppValue('core', 'remote_'.$name, $appid.'/'.$path);
}
foreach($appData['public'] as $name=>$path){
OCP\CONFIG::setAppValue('core', 'public_'.$name, $appid.'/'.$path);
diff --git a/lib/mail.php b/lib/mail.php
index 7343f5f0d97..7eb2c4770c5 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -36,7 +36,7 @@ class OC_Mail {
$SMTPPASSWORD = OC_Config::getValue( 'mail_smtppassword', '' );
- $mailo = new PHPMailer();
+ $mailo = new PHPMailer(true);
if($SMTPMODE=='sendmail') {
$mailo->IsSendmail();
}elseif($SMTPMODE=='smtp'){
@@ -56,33 +56,35 @@ class OC_Mail {
$mailo->From =$fromaddress;
$mailo->FromName = $fromname;;
$a=explode(' ',$toaddress);
- foreach($a as $ad) {
- $mailo->AddAddress($ad,$toname);
+ try {
+ foreach($a as $ad) {
+ $mailo->AddAddress($ad,$toname);
+ }
+
+ if($ccaddress<>'') $mailo->AddCC($ccaddress,$ccname);
+ if($bcc<>'') $mailo->AddBCC($bcc);
+
+ $mailo->AddReplyTo($fromaddress, $fromname);
+
+ $mailo->WordWrap = 50;
+ if($html==1) $mailo->IsHTML(true); else $mailo->IsHTML(false);
+
+ $mailo->Subject = $subject;
+ if($altbody=='') {
+ $mailo->Body = $mailtext.OC_MAIL::getfooter();
+ $mailo->AltBody = '';
+ }else{
+ $mailo->Body = $mailtext;
+ $mailo->AltBody = $altbody;
+ }
+ $mailo->CharSet = 'UTF-8';
+
+ $mailo->Send();
+ unset($mailo);
+ OC_Log::write('mail', 'Mail from '.$fromname.' ('.$fromaddress.')'.' to: '.$toname.'('.$toaddress.')'.' subject: '.$subject, OC_Log::DEBUG);
+ } catch (Exception $exception) {
+ OC_Log::write('mail', $exception->getMessage(), OC_Log::DEBUG);
}
-
- if($ccaddress<>'') $mailo->AddCC($ccaddress,$ccname);
- if($bcc<>'') $mailo->AddBCC($bcc);
-
- $mailo->AddReplyTo($fromaddress, $fromname);
-
- $mailo->WordWrap = 50;
- if($html==1) $mailo->IsHTML(true); else $mailo->IsHTML(false);
-
- $mailo->Subject = $subject;
- if($altbody=='') {
- $mailo->Body = $mailtext.OC_MAIL::getfooter();
- $mailo->AltBody = '';
- }else{
- $mailo->Body = $mailtext;
- $mailo->AltBody = $altbody;
- }
- $mailo->CharSet = 'UTF-8';
-
- $mailo->Send();
- unset($mailo);
-
- OC_Log::write('Mail from '.$fromname.' ('.$fromaddress.')'.' to: '.$toname.'('.$toaddress.')'.' subject: '.$subject,'mail',OC_Log::DEBUG);
-
}
diff --git a/lib/setup.php b/lib/setup.php
index 2f73c486c9c..027c84db092 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -257,7 +257,7 @@ class OC_Setup {
OC_Installer::installShippedApps();
//create htaccess files for apache hosts
- if (strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
+ if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
self::createHtaccess();
}