oops sorry,
I never use this property in the API it's written "Contains the
rendered plain text message if one was sent."
Have you sent the email before use the property textMessage?
there is an "htmlMessage" property have you sent you're email in html
or text?

On 6 jan, 10:12, Hans Heidemann <[email protected]>
wrote:
> Thank you for your answer. But my question was not about sending the
> Email which is working perfectly. I do want to put the rendered E-Mail
> to a logfile. To get the rendered Message, I use $this->Email->testMessage() 
> which is different from the Documentation: $this->Email-
> >textMessage and I want to understand if this is an error or a
>
> feature.
>
> On 6 Jan., 09:35, BenJsno <[email protected]> wrote:
>
>
>
>
>
>
>
> > I use Email component too, but to send a content I make an element :
>
> > in the method's controller which send the email add:
> > $this->Email->template = 'myemail'; // note no '.ctp'
> > $this->Email->sendAs = 'html';
>
> > in views/elements/email/html/myemail.ctp :
> > <p>hello</p>
> > <p>email content</p>
>
> > in views/layouts/email/html/default.ctp :
> > <?php  echo $this->Html->docType();  ?>
> > <html style="background:#FFF;width:100%;height:100%;">
> > <body style="width:830px;margin:10px auto;">
> >         <div style="width:100%;height:50px;margin-bottom:10px;">
> >                 <?php echo $this->Html->image('http://www.mywebsite.com/img/
> > logo.png'); ?>
> >         </div>
> >         <div style="background:hsl(0,0%,90%); color:hsl(0,0%,10%); 
> > margin-top:
> > 20px; margin-bottom:20px; padding:10px 15px; border-radius: 5px;-moz-
> > border-radius: 5px;box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);">
> >                 <?php echo $content_for_layout; ?>
> >         </div>
> > </body>
> > </html>
>
> > On 5 jan, 16:30, eyeman <[email protected]> wrote:
>
> > > I am sending out Emails with a cake shell script. And sending the
> > > email works fine by the way.
>
> > > Additionally, I do want to write the content of the email to a
> > > logfile.
>
> > > If I use $this->Email->textMessage (as mentioned in the documentation)
> > > to get the rendered email, the content is always empty.
>
> > > By accident I found out, that $this->Email->textMessage() delivers the
> > > rendered email.
>
> > > I do not understand why. Looking into email.php shows me, that
> > > $textMessage is not a function.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to