Yii Framework Forum: Unable To Send Email With Mamp On Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unable To Send Email With Mamp On Yii i'm trying to send mail to admin when user saves a image Rate Topic: -----

#1 User is offline   developer! 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 110
  • Joined: 28-November 12

Posted 13 December 2012 - 08:16 AM

hi all,

I"m new to yii.. I'm trying to send email to adminEmail (which is in config/main.php). I'm trying this on mamp with yii.

i've downloaded emailer extension and added this in components array of config/main.php.

in my controller i've written like this




$message = 'msg msg testing';
Yii::app()->mailer->Host = 'smtp.yiiframework.com';
Yii::app()->mailer->IsSMTP();
Yii::app()->mailer->FromName = 'dev';
Yii::app()->mailer->From = 'dev@dev.com';
//Yii::app()->mailer->AddReplyTo('dev@dev.com');
Yii::app()->mailer->AddAddress('dev@dev.com');
Yii::app()->mailer->Subject = 'ding ding sub';
Yii::app()->mailer->Body = $message;
Yii::app()->mailer->Send();


its not working from my local machine ...whats going wrong here??
im working on mamp and i did not change anything in php.ini file..do i need to change any??
0

#2 User is offline   mrk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 07-March 11

Posted 13 December 2012 - 08:53 AM

It won't work on your local machine unless you install local mail server or to be more strict SMTP server.
0

#3 User is offline   developer! 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 110
  • Joined: 28-November 12

Posted 13 December 2012 - 08:55 AM

View Postmrk, on 13 December 2012 - 08:53 AM, said:

It won't work on your local machine unless you install local mail server or to be more strict SMTP server.




@mrk : firstly thanks for your time and reply.

I've used mailer extension. as it is 3rd party extension..still doesnt it work in my local mamp???
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users