Friday 05 September 2003 3:00:33 am
Hi Paolo
I did this by making the following changes to
/kernel/content/collectinformation.php (my added lines marked)
$subject =& $tpl->variable( 'subject' );
$receiver =& $tpl->variable( 'email_receiver' );
>>>> $sender =& $tpl->variable( 'email_sender' ); $redirectToNodeID =& $tpl->variable( 'redirect_to_node_id' );
$ini =& eZINI::instance(); $mail = new eZMail();
if ( !$mail->validate( $receiver ) )
{
// receiver does not contain a valid email address, get the default one
$receiver = $ini->variable( "InformationCollectionSettings", "EmailReceiver" );
}
$mail->setReceiver( $receiver );
>>>> if ( !$mail->validate( $sender ) )
>>>> {
>>>> // sender does not contain a valid email address, get the default one
>>>> $sender = $ini->variable( "InformationCollectionSettings", "EmailSender" );
>>>> }
>>>>
>>>> $mail->setSender( $sender );
$mail->setSubject( $subject );
$mail->setBody( $templateResult ); $mailResult = eZMailTransport::send( $mail ); Replace 'email_sender' with whatever name you used in the set-block in collectedinfomail.tpl Good luck
|