I had a few issues getting email working and in the end it was
spelling, capitalisation or just not having everything the right place
- check the following:
- Are you including 'Email' as a component in your controller (var
$components = array('Email');)?
- If you have a function in a controller to send an email are you
referencing it with $this->Email->...?
- Are you setting sendAs ($this->Email->sendAs = 'html'; or $this-
>Email->sendAs = 'text';)?
- Have you put the layouts in the right place (views/layouts/email/
html/default.ctp and views/layouts/email/text/default.ctp)?
- Are you calling a template ($this->Email->template =
'your_template';)?
- Are the templates in the right place (views/elements/email/html/
your_template.ctp and views/elements/email/text/your_template.ctp)?
- Are the templates correct - for text it is simply:
<?php echo $content_for_layout;?>
- For html it is this at minimum:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
        <head>
                <title><?php echo $title_for_layout;?></title>
        </head>
        <body>
                <?php echo $content_for_layout;?>
        </body>
</html>
- Try adding '$this->Email->reset();' at the start of your email
function.

On Nov 18, 7:21 pm, Felipe Theodoro <[email protected]> wrote:
> hello guys.
> I'm having a problem in e-mail component. Do not send this email, and
> returns no error. I tested the mail () function of php and it worked but the
> component does not send. Does anyone have any idea what might be?
> php version 5.2.9
> cake version 1.2.5
>
> --
> Felipe Theodoro Gonçalves
> [email protected]
> blog.ftgoncalves.com
> --

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.


Reply via email to