User email ID in form submission notification
Permalink<?php
defined('C5_EXECUTE') or die("Access Denied.");
$submittedData='';
foreach($questionAnswerPairs as $questionAnswerPair){
$submittedData .= "<b>".$questionAnswerPair['question']."</b>"." :- ".$questionAnswerPair['answer']."<br/>"."<br/>";
}
$formDisplayUrl=BASE_URL.DIR_REL.'/' . DISPATCHER_FILENAME . '/dashboard/reports/forms/?qsid='.$questionSetId;
$bodyHTML = t("
There has been a payment request submitted by <b><?php echo $uEmail ?></b>.<br/><br/>
%s
<br/>View Full Reports :
%s
", $submittedData, $formDisplayUrl);
But I am not getting user email ID displayed, please advise.
Rony
<?php defined('C5_EXECUTE') or die("Access Denied."); $submittedData=''; $uEmail = 'do-not-reply@test.com'; foreach($questionAnswerPairs as $questionAnswerPair){ $submittedData .= "<b>".$questionAnswerPair['question']."</b>"." :- ".$questionAnswerPair['answer']."<br/>"."<br/>"; } $formDisplayUrl=BASE_URL.DIR_REL.'/' . DISPATCHER_FILENAME . '/dashboard/reports/forms/?qsid='.$questionSetId; $bodyHTML = t(" There has been a payment request submitted by <b>%s</b>.<br /><br /> %s <br />View Full Reports : %s ", $uEmail, $submittedData, $formDisplayUrl);
From the above code I've set $uEmail = 'do-not-reply@test.com'; so it will be shown in your email. If its working then let me know. I'll explain you next step.
Rony
Parse error: syntax error, unexpected T_FOREACH in aaaa.co.in/mail/block_form_submission.php on line 6
I think now in foreach we need to define something
Rony