Created
December 3, 2013 16:38
-
-
Save joaocc/7772496 to your computer and use it in GitHub Desktop.
PHPFox 3.7.2: non-official fix for problem in sending mails as-users (module Contact) by HighSkillz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/phpfoxdev/module/contact/include/service/contact.class.php b/phpfoxdev/module/contact/include/service/contact.class.php | |
index 18ed3c9..f65801f 100644 | |
--- a/com-hsz-dev-aux5/src-www/phpfoxdev/module/contact/include/service/contact.class.php | |
+++ b/com-hsz-dev-aux5/src-www/phpfoxdev/module/contact/include/service/contact.class.php | |
@@ -72,6 +72,14 @@ class Contact_Service_Contact extends Phpfox_Service | |
$sText .= Phpfox::getPhrase('contact.profile') . ': ' . Phpfox::getLib('url')->makeUrl(Phpfox::getUserBy('user_name')) . '<br />'; | |
$sText .= '------------------------------------------------------------<br />'; | |
} | |
+ else | |
+ { | |
+ $sText .= Phpfox::getPhrase('contact.full_name') . ': ' . $aValues['full_name'] . '<br />'; | |
+ $sText .= Phpfox::getPhrase('contact.email') . ': ' . $aValues['email'] . '<br />'; | |
+ $sText .= '------------------------------------------------------------<br />'; | |
+ } | |
if (!empty($aValues['category_id']) && $aValues['category_id'] == 'phpfox_sales_ticket') | |
{ | |
$sText = $oParser->clean($aValues['text']); | |
@@ -98,13 +106,20 @@ class Contact_Service_Contact extends Phpfox_Service | |
foreach ($aMails as $sMail) | |
{ | |
$sMail = trim($sMail); | |
$bSend = Phpfox::getLib('mail')->to($sMail) | |
->messageHeader(false) | |
->subject((!empty($aValues['category_id']) ? Phpfox::getLib('locale')->convert($aValues['category_id']) . ': ' : '') . $aValues['subject']) | |
->message($sText) | |
- ->fromName($aValues['full_name']) | |
- ->fromEmail($aValues['email']) | |
+ ->fromName(Phpfox::getParam('core.mail_from_name')) | |
+ ->fromEmail(Phpfox::getParam('core.email_from_email')) | |
->send(); | |
$bResult = $bResult && $bSend; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment