After struggle with email component source code, you should write the right
format for Email->to and Email->from. Like below:
$this->Email->smtpOptions = array(
            'port' => '465',
            'timeout' => '30',
            'host' => 'ssl://smtp.gmail.com',
            'username' => '[email protected]',
            'password' => 'password');
        $this->Email->delivery = 'smtp';
        //$this->Email->to = $user['email'];
        $this->Email->to = 'Sir.B <[email protected]>';
        $this->Email->subject = 'Fuck!!!!';
        $this->Email->replyTo = '[email protected]';
        $this->Email->from = 'Sir.A <[email protected]>';
But I didn't find any doc explain this. Stupid format. Why not an array?
Give an example of phpmailer
//code
 public function AddReplyTo($address, $name = '') {
    $cur = count($this->ReplyTo);
    $this->ReplyTo[$cur][0] = trim($address);
    $this->ReplyTo[$cur][1] = $name;
  }
//end
And we write this configure like this:
//code
var $from         = '[email protected]';
var $fromName     = "Sir.A";
//end

On Sat, Apr 4, 2009 at 9:56 AM, joshua <[email protected]> wrote:

> Any one can give an example configure if you have succeed on this?
>
> On Fri, Apr 3, 2009 at 11:42 PM, joshua <[email protected]> wrote:
>
>> I try every way that I can find to send email from my gmail account or
>> yahoo account , but both of them are failed. I use cake Email component to
>> send.
>> ###################################################
>> $this->Email->smtpOptions = array(
>>             'port' => '25',//for gmail 465
>>             'timeout' => '30',
>>             'host' => 'smtp.yahoo.com', // for gmail ssl://smtp.gmail.com
>>             'username' => '[email protected]', //[email protected]
>>             'password' => 'xxxxxxx');
>>         $this->Email->delivery = 'smtp';
>>         $this->Email->to = '[email protected]';// or '[email protected]'
>>         $this->Email->subject = 'Thanks';
>>         $this->Email->replyTo = '[email protected]';
>>         $this->Email->from = 'Example <[email protected]>';
>>         $this->Email->template = 'simple'; // note no '.ctp'
>>         $result = $this->Email->send();
>>         debug($this->Email->smtpError);
>> ###################################################
>>
>> --
>> Thanks
>> Joshua
>>
>
>
>
> --
> Thanks
> Joshua
>



-- 
Thanks
Joshua

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