# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- administrator/components/com_comprofiler/comprofiler.class.php +++ administrator/components/com_comprofiler/comprofiler.class.php @@ -81,8 +81,15 @@ $mail->Sendmail = $_CB_framework->getCfg( 'sendmail' ); } } - $mail->Sender = $mail->From; - + + $email_parts = explode( '@', $mail->From ); + $email_domain = ( isset( $email_parts[1] ) ? $email_parts[1] : null ); + $site_domain = parse_url( $_CB_framework->getCfg( 'live_site' ), PHP_URL_HOST ); + + if ( $email_domain && ( stripos( $site_domain, $email_domain ) !== false ) ) { + $mail->Sender = $mail->From; + } + $mail->Subject = $subject; $mail->Body = $body;