I"m using moodle 1.99
My site is hosted in godaddy.
I wrote this in the smtphosts line
but it didn"t work
There is no Moodle 1.99.
How did you install Moodle? Did you use GoDaddy's one button install, or did you install it yourself? Do you have the ability to edit CRON jobs? Have you talked with GoDaddy?
Since you installed Moodle yourself, you will need to edit CRON yourself in order to get email working. CRON (or CRONTAB) can be found in your control panel. You will need to add an entry to it that looks something like:
/usr/bin/wget -O - -q "" > /dev/null 2>&1
This is what I use, and it seems to work well. You can find out more about this in the Moodle docs. Some folks know how to do this from SSH, but I find it easier to do this from the control panel tool.
By the way, you don't need to edit Moodle's cron.php.