vikmalhotra
vikmalhotra

Reputation: 10071

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

Upvotes: 0

Views: 3869

Answers (3)

Rick
Rick

Reputation: 17013

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.

Upvotes: 0

Young
Young

Reputation: 8356

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>

Upvotes: 5

James Skidmore
James Skidmore

Reputation: 50278

It can be modified from app/views/layouts/email/text/default.ctp and app/views/layouts/email/html/default.ctp.

Upvotes: 3

Related Questions