Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joaocc/7772496 to your computer and use it in GitHub Desktop.
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
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