you can use the phpmailer component to send email to gmail or yahoo.
once you have copied the phpmailer folder to your app\vendors folder,
please edit the email.php file in the app\controllers\components
folder.
In email.php pls edit the send() function with the following, i have
shown mail sending for gmail:
$mail->Host = "smtp.gmail.com";
$mail->SMTP_PORT = 465;
$mail->SMTPSecure = "ssl";
$mail->Username = SMTP username //add ur gmail id here
$mail->Password = SMTP password //password for the above id
Then add this line to ur controller file :
var $components = array('Email');
Next u can call the mail component from ur controller function as
follows:
$fromId = //the id u want to see in the to section of ur mail
$fromName = //name
$emailBody= //content of email - string
$this->set('data', $emailBody);
$this->Email->from = $fromId;
$this->Email->fromName = $fromName;
$this->Email->to = $toId;//define to id
$this->Email->BodyHTML =$content;
$this->Email->subject = $subject;
($this->Email->send() - send email
On Mar 20, 7:03 am, nhathoang nhathoang <[email protected]>
wrote:
> I used to send mail by cakephp but not to succeed, I don't know why, there
> is a way to send mail you should use which is phpmailer, you show write a
> component and attach phpmailer to it
>
> 2009/3/20 dr. Hannibal Lecter <[email protected]>
>
>
>
>
>
> > You send an email to yahoo and gmail the same way you send to any
> > other account, right?
>
> > Also, why are you working on cakephp 1.1?
>
> > On Mar 19, 2:40 pm, sandhya <[email protected]> wrote:
> > > send email to yahoo and gmail accounts using cakephp 1.1.19.6305- Hide
> > > quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---