| | 392 | |
|---|
| | 393 | if( isset($this->BodyTpl) ) { |
|---|
| | 394 | |
|---|
| | 395 | $mailtpl = new jTpl(); |
|---|
| | 396 | $metas = $mailtpl->meta( $this->BodyTpl ); |
|---|
| | 397 | |
|---|
| | 398 | if( isset($metas['Subject']) ) |
|---|
| | 399 | $this->Subject = $metas['Subject']; |
|---|
| | 400 | |
|---|
| | 401 | if( isset($metas['Priority']) ) |
|---|
| | 402 | $this->Priority = $metas['Priority']; |
|---|
| | 403 | $mailtpl->assign('Priority', $this->Priority ); |
|---|
| | 404 | |
|---|
| | 405 | if( isset($metas['From']) ) { |
|---|
| | 406 | $this->From = $this->decAdrs( $metas['From'], 'addresse' ); |
|---|
| | 407 | $this->FromName = $this->decAdrs( $metas['From'], 'name' ); |
|---|
| | 408 | } |
|---|
| | 409 | $mailtpl->assign('From', $this->From ); |
|---|
| | 410 | $mailtpl->assign('FromName', $this->FromName ); |
|---|
| | 411 | |
|---|
| | 412 | if( isset($metas['Sender']) ) |
|---|
| | 413 | $this->Sender = $metas['Sender']; |
|---|
| | 414 | $mailtpl->assign('Sender', $this->Sender ); |
|---|
| | 415 | |
|---|
| | 416 | if( isset($metas['to']) ) |
|---|
| | 417 | foreach( $metas['to'] as $val ) |
|---|
| | 418 | $this->AddAddress($this->decAdrs($val, 'addresse'), $this->decAdrs($val, 'name')); |
|---|
| | 419 | $mailtpl->assign('to', $this->to ); |
|---|
| | 420 | |
|---|
| | 421 | if( isset($metas['cc']) ) |
|---|
| | 422 | foreach( $metas['cc'] as $val ) |
|---|
| | 423 | $this->AddCC($this->decAdrs($val, 'addresse'), $this->decAdrs($val, 'name')); |
|---|
| | 424 | $mailtpl->assign('cc', $this->cc ); |
|---|
| | 425 | |
|---|
| | 426 | if( isset($metas['bcc']) ) |
|---|
| | 427 | foreach( $metas['bcc'] as $val ) |
|---|
| | 428 | $this->AddBCC($this->decAdrs($val, 'addresse'), $this->decAdrs($val, 'name')); |
|---|
| | 429 | $mailtpl->assign('bcc', $this->bcc ); |
|---|
| | 430 | |
|---|
| | 431 | if( isset($metas['ReplyTo']) ) |
|---|
| | 432 | foreach( $metas['ReplyTo'] as $val ) |
|---|
| | 433 | $this->AddReplyTo($this->decAdrs($val, 'addresse'), $this->decAdrs($val, 'name')); |
|---|
| | 434 | $mailtpl->assign('ReplyTo', $this->ReplyTo ); |
|---|
| | 435 | |
|---|
| | 436 | $this->Body = $mailtpl->fetch( $this->BodyTpl ); |
|---|
| | 437 | |
|---|
| | 438 | } |
|---|