-
-
Save aikchun/6798608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function successfulSomething($data) { | |
$email = $this->email; | |
$email->subject('You have successfully done something:' . $data['title']); | |
$email->template('successful_done'); | |
// This is outdated | |
// $email->sendAs = 'text'; | |
$email->emailFormat('html'); // This will allow the view to use html tags to be reflected in the email. | |
$email->viewVars(array('data' => $data); // set multiple variables into email view. | |
if (EMAIL_ON) { | |
$result = $email->send(); | |
} else { | |
$result = $email; | |
} | |
return $result; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi <?php echo $full_name; ?>, | |
You have successfully done something: <?php echo $title; ?>. | |
Share the good news about <?php echo Router::url('/'); ?>. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment