예제 #1
0
 function testemail()
 {
     global $subthanksemail, $thanksemail, $DT_mailfrom, $DT_fromname, $admin_registrationemail;
     $Tagparser = new Tagparser();
     //$Tagparser->getTagcontent('GROUP_MEMBER',$thanksemail);
     // $Tagparser->replaceTagContent('GROUP_MEMBER',$thanksemail);
     $user = $this->getModel('user')->table;
     $user->load(541);
     // $user->TableEvent->load($user->eventId);
     if ($user->TableEvent->thksmsg_set) {
         $thkmsg = $user->TableEvent->thksmsg;
     } else {
         $thkmsg = $thanksemail;
     }
     $subject = $Tagparser->parsetags($subthanksemail, $user);
     echo "<br /><b>Subject : </b>" . $subject . "<br />";
     $groupmsg = $Tagparser->getTagcontent('GROUP_MEMBER', $thkmsg);
     $memberdata = "";
     if ($user->type == 'G') {
         foreach ($user->members as $member) {
             //   pr($member);
             // pr($groupmsg);
             $memberdata .= $Tagparser->parsetags($groupmsg, $member);
         }
     }
     $usermsg = $Tagparser->replaceTagContent('GROUP_MEMBER', $thkmsg, $memberdata);
     echo $Tagparser->parsetags($usermsg, $user);
     echo "<br /> <b><<<<======================Admin Email=============================///>>></b>";
     pr($admin_registrationemail);
     $groupmsg = $Tagparser->getTagcontent('GROUP_MEMBER', $admin_registrationemail);
     $usermsg = $Tagparser->replaceTagContent('GROUP_MEMBER', $admin_registrationemail);
     echo $Tagparser->parsetags($usermsg, $user);
     if ($user->type == 'G') {
         foreach ($user->members as $member) {
             echo $Tagparser->parsetags($groupmsg, $member);
         }
     }
     die;
     /* require_once(JPATH_SITE."/components/com_dtregister/views/email/view.html.php");
     
     	  $emailview = new DtregisterViewEmail(array());
     
     	  $emailview->assign('user',$user);
     
     	  $emailview->assign('userdata', $Tagparser->userdata($user->userId));
     
     	  $emailview->assign('paymentmethods',$Tagparser->paymentmethods);
     
     	  $emailview->setLayout('registrationadmin');
     
     	  $adminemails=$user->TableEvent->email;
     
     	  $adminemails = explode(";",$adminemails);
     
     	  ob_start();
     
     	  $emailview->display();
     
     	  echo $adminmsg = ob_get_clean();*/
 }
예제 #2
0
 function registrationemail()
 {
     global $DT_mailfrom, $DT_fromname, $thanksmsg, $admin_registrationemail, $admin_notification, $subject_admin_registrationemail, $admin_email_from_user;
     if (isset($this->sendemail)) {
         if ($this->sendemail == false) {
             return;
         }
     }
     $this->load($this->userId);
     $this->TableEvent->load($this->eventId);
     if ($this->TableEvent->event_admin_email_set) {
         $DT_mailfrom = $this->TableEvent->event_admin_email_from_email;
         $DT_fromname = $this->TableEvent->event_admin_email_from_name;
     }
     $this->registrantemail();
     if ($this->TableEvent->admin_notification_set) {
         $admin_notification = $this->TableEvent->admin_notification;
     } else {
         $admin_notification = $admin_registrationemail;
     }
     // prd($admin_notification);
     $Tagparser = new Tagparser();
     $groupmsg = $Tagparser->getTagcontent('GROUP_MEMBER', $admin_notification);
     $memberdata = "";
     if ($this->type == 'G') {
         foreach ($this->members as $member) {
             $memberdata .= $Tagparser->parsetags($groupmsg, $member);
         }
     }
     $usermsg = $Tagparser->replaceTagContent('GROUP_MEMBER', $admin_notification, $memberdata);
     $adminmsg = $Tagparser->parsetags($usermsg, $this);
     $adminemails = $this->TableEvent->email;
     $adminemails = explode(";", $adminemails);
     $subadmin = $Tagparser->parsetags($subject_admin_registrationemail, $this);
     $admin_attachments = $this->getAttachments();
     foreach ($adminemails as $email) {
         if ($admin_email_from_user) {
             $DT_mailfrom = $this->getFieldByName('email');
             $DT_fromname = $Tagparser->name($this);
         }
         JUTility::sendMail($DT_mailfrom, strip_tags(html_entity_decode($DT_fromname)), $email, strip_tags(html_entity_decode($subadmin)), $adminmsg, 1, null, null, $admin_attachments);
     }
 }