0
我遇到了一個問題,我無法解決。fuelphp html email issue
我看了看fuelphp文檔,做這樣的說法,但我得到通過walue錯誤
代碼
$email_data = array();
//echo Config::get('base_url'). "user/activate/". $user['hash'];
$email = Email::forge();
$email->from('[email protected]', Config::get('site_name'));
$email->to(Input::post('email'), Input::post('first_name') . " " . Input::post('last_name'));
$email->subject('Regisztráció');
$email_data['name'] = "Kedves " . Input::post('first_name'). " " .Input::post('last_name') ."<br><br>" ;
$email_data['title'] = "Üdvözöllek a ".Config::get('site_name')." oldalán" ."<br>";
$email_data['link'] = '<a href="'.Config::get('site_url'). "user/activate/". $user['hash'].'">Fiókod mherősítéséhez kérlek kattints ide</a>';
$email->html_body(\View::forge('email/activation', $email_data));
$email->send();
$response->body(json_encode(array(
'status' => 'ok',
)));
電子郵件模板文件
<?php
print_r($email_data);
?>
和電子郵件發送給我
Notice!
ErrorException [ Notice ]: Undefined variable: email_data
APPPATH/views/email/activation.php @ line 3:
2:3:print_r($email_data);4:?>
可以請別人給我一個提示什麼即時做錯了?
哦,我現在覺得有點笨,謝謝你的幫助 – Side 2012-08-11 08:12:12
沒問題。我已經完成的次數很容易被發現! – 2012-08-11 12:14:23