Hi!

Here is my send function in users_controller.php
The $id is given from another function. I debug($id) and it's ok.


function _sendNewUserMail($id) {
            $User = $this->User->read(null,$id);
            $this->Email->to = '[EMAIL PROTECTED]';
            $this->Email->bcc = array('[EMAIL PROTECTED]');  // note
                                                              // this could
be just a string too
            $this->Email->subject = 'Welcome to our really cool thing';
            $this->Email->replyTo = '[EMAIL PROTECTED]';
            $this->Email->from = '[EMAIL PROTECTED]';
            $this->Email->template = 'activate'; // note no '.ctp'
            //Send as 'html', 'text' or 'both' (default is 'text')
            $this->Email->sendAs = 'both'; // because we like to send pretty
mail
            //Set view variables as normal
            $this->set('User', $User);
            //Do not pass any args to send()
            $this->Email->send();
 }

The app\views\elements\email\html\activate.ctp

<p>Dear <?php echo $User['User']['username'] ?>,<br />
 &nbsp;&nbsp;&nbsp;Thank you for your interest.</p>

The app\views\elements\email\text\activate.ctp

Dear <?php echo $User['User']['username'] ?>,
   Thank you for your interest.

The app\views\layouts\email\html\default.ctp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
        <body>
                <?php echo $content_for_layout; ?>
        </body>
</html>

The app\views\layouts\email\text\default.ctp

<?php echo $content_for_layout; ?>


So my layout is default.ctp and my element/template is activate.ctp.
Is that a problem? Or do I have to specifically set the layout
somewhere?

I also found this yesterday:http://marcgrabanski.com/tags.php?
tag=CakePHP

This could be a problem, since my users_controller.php is encoded in
utf8 because of some special chars in $this->Session-setFlash();

Setting $this->Email->charset = 'iso-8859-15'; didn't help

I'm confused

Donnerbeil

Also my DB is utf8 encoded. And my subject is also changed to
something like, "=?UTF-8?B?V2VsY29tZ..."

--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to