For anyone else suffering this problem the solution is:

For some reason Cake won't do attachments unless you state the
filePaths first.
This is the case even if you are using an absolute path for your
attachments.

Thanks.

On Apr 21, 2:47 pm, Doug <[EMAIL PROTECTED]> wrote:
> I've done a scount round the group for info on this but not found any
> help.  One person wasn't answered - I hope that won't be the case this
> time round.
>
> Basically I'm attempting to send an email with attachment.  Using this
> code:
>     //@todo Send from client email address
>     $this->Email->to      = '[EMAIL PROTECTED]';
>     $this->Email->subject = 'Something';
>     $this->Email->replyTo = $client['Client']['email'];
>     $this->Email->from    = $client['Client']['email'];
>     $this->Email->sendAs  = 'html';
>     $this->Email->attachments = array('/home/username/
> article_button.png');
>     if($this->Emailer->send('Testing', null, null)){
>       die('Email Sent!');
>     }else{
>       die('Failed to send email');
>     }
>
> It dies with "Email Sent" and I do get the email in my inbox.  However
> there's no attachment.  Anyone got any ideas?   I've checked
> permissions on the file and chmodded them to 777.  No luck there.
>
> Hoipe you can help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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