***note : only for linux users.
**you should following steps..
install ssmtp on your computer by running following command.
**sudo apt-get install ssmtp**
### step-2: now change in ssmtp.conf (/etc/ssmtp/ssmtp.conf)
# # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=**your email id (like- john@gmail.com)** # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com mailhub=smtp.gmail.com:587 # Where will the mail seem to come from? #rewriteDomain= # The full hostname hostname=**your email id (like- john@gmail.com)** # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address **FromLineOverride=YES UseSTARTTLS=YES AuthUser=your email id (like- john@gmail.com) AuthPass=password
**
** now change in php.ini (/etc/php5/apache2/php.ini)
**sendmail_path = /usr/sbin/ssmtp -t -i**

and then check it by write simple file in php which contain echo phpinfo();
now change in main.php (/protected/config/main.php)
'params'=>array(
// this is used in contact page
'adminEmail'=>'### **webmaster@example.com**',
),
put your email instead of webmaster@example.com.
and run and test your contact.php .... you find email at your email id....._cool naa_:-)
for more information go on : my blog...
Total 1 comment
This wiki is merely an instruction on setting up ssmtp on Debian-like machine. But it doesn't explain why you should install it and what's the benefit over using sendmail/qmail/postfix/exim/whatever (the wiki doesn't explain what ssmtp is, so I'm only guessing it's a kind of SMTP server; I never heard of it). What's more, there is no explanation why ssmtp is specifically better in Yii app.
So for now - thumb down. Please improve this entry - give some introduction, background and usage rationale - and I can change my mind.
Leave a comment
Please login to leave your comment.