I don't have much time to explain it right now, but this is a (working) 
snippet from a project I just finished a little while ago:

--------------------------------------------
$this->Email->to = '[EMAIL PROTECTED]';
$this->Email->subject = 'E-Mail from domain.com';
$this->Email->from = $this->data['EmailMessage']['name'].' 
<[EMAIL PROTECTED]>';

$this->Email->charset = 'utf8';
$this->Email->sendAs = 'html';
$this->Email->template = 'contact';
               
if (!empty($this->data['EmailMessage']['email']))
{
    $this->Email->replyTo = $this->data['EmailMessage']['name'].' 
<'.$this->data['EmailMessage']['email'].'>';
}

$content = am
(
    $this->data['EmailMessage']
    , array
    (
        'ip' => $this->RequestHandler->getClientIP()
    )
);

$this->Email->send($content);
$this->render('sent');
--------------------------------------------

The data is available in the view via $content['ip'], $content['name'], 
etc. ...

Let me know if this helps,
-- Felix Geisendörfer aka the_undefined
--------------------------
http://www.thinkingphp.org
http://www.fg-webdesign.de


thequietlab wrote:
> hi everybody,
>
> I'm kind of new to cakephp and from time to time I drown into some
> problems :)
> Now I stucked with sending emails, I tried the new EmailComponent from
> version 1.2 which is described in a bakery but somehow had problems
> with passing variables to my views, not even saying that my html
> emails didn't appear in my outlook (though I checked the html source
> and the content was there). I didn't spend to much time resolving
> these issues and just tried phpmailer, which I usually use, as
> described in bakery (btw. great resource!:)) but I had some other
> problems with layout/views mixed between those for emails and those
> for my controller action..
>
> My question is : does anybody has a working example of sending emails,
> both html and text, either through EmailComponent or any other vendor
> lib ?
>
> Thanks,
> Andrzej
>
>
> >
>
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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