email_body (function)

Purpose:

Predefined email templates can be stored in users/views

See Also:

email (function)

Example:

$body = email_body('_email_adminPwReset.php',$params);

Data Type(s):

$body = email_body('email_view',$params);

Location:

users/helpers/helpers.php

Details:

You can pass variables from your PHP page directly into the email.  It would look something like this.

$params = array(
'username' => $userdetails->username,
'sitename' => $settings->site_name,
'fname' => $userdetails->fname,
 'email' => rawurlencode($userdetails->email),
'vericode' => $userdetails->vericode,
'reset_vericode_expiry' => $settings->reset_vericode_expiry
 );
$to = rawurlencode($userdetails->email);
  $subject = 'Password Reset';
$body = email_body('_email_adminPwReset.php',$params);
  email($to,$subject,$body);