1.4

2012-02-06 5 views
0

내가 심포니 1.4 배치 스크립트에서 이메일을 만드는거야 승/1.4

player/emailSuccess.php 

foreach ($players as $player) { 

    if ($users->meetCriteria) { 

     //send email from a template 
     $email->setBody('player/emailSuccess.php'); 

    } 
} 

내가를 검색 할 수있는 템플릿에 전자 메일의 본문을 설정하려고 추진 심포니에서 템플릿을 검색 전자 메일 액션을 플레이어 모듈에 전달하고 배치 스크립트 내에서 $ player 변수를 전달 하시겠습니까?

+0

가능하다고 생각합니다. 'Partial' 도우미를로드하고 플레이어 모듈이있는 응용 프로그램으로 스크립트를 실행하십시오. – greg0ire

답변

0

시도해보십시오.

foreach ($players as $player) { 

if ($users->meetCriteria) { 

    // use a partial to get the formatted email payload 
    $html = $this->getPartial('my_partial', array('MyObject' => $MyObject)); 
    //send email from a template 
    $email->setBody($html); 
    ....... 
    } 
}