Send mail using CakePHP
I am trying to send mail using CakePHP开发者_开发百科 in-built Email component. When I send the mail, there is this footer [This email was sent using the CakePHP Framework: http://cakephp.org]. How can I lose that?
Regards
If you've set
$this->Email->template = "enquiry";
Then you need to make the template named 'enquiry.ctp' in app/views/layouts/email/text/
and app/views/layouts/email/html/
as below:
text template:
<?php echo $content_for_layout; ?>
html template:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<?php echo $content_for_layout; ?>
</body>
</html>
It can be modified from app/views/layouts/email/text/default.ctp
and app/views/layouts/email/html/default.ctp
.
No, you don't remove the original file, you just override it by posting a file of the same name in the appropriate place (which will differ from where the file is located within the core cake files (i.e. cake/libs), I think in this case it just goes in the place SpawnCxy said, just use the same name as the file you are trying to override.
精彩评论