PDA

View Full Version : what changes to make in "php.ini" file to send a mail



starfish
11-25-2008, 04:48 AM
well a very general question may have already been asked by many people
i want a execute a script to send a mail
i made changes to "php.ini" file but it is not working
i am not sure about whether we have to place this file parallel to the php scripts
or it is to be placed where it resides originally??
pls specify the changes also if someone has executed a script to send a mail
i am not sure about these changes too
thanks..

owt200x
12-04-2008, 12:49 AM
the script should handle the mail being sent by itself, the only thing you probably need to change in the php.ini is the smtp server location (default is localhost) and it stays in the server folder where it normally is.

what kind if php mail script are you using?

starfish
12-11-2008, 06:54 AM
what kind of php mail script i am using....??
that's the problem..
i am not able to understand what u said..
i am just trying to send a mail .. i know the code to write through php's mail() function but
i am not able to send it ..
pls give some more descirption about this..
thanks..

Falcon1986
12-11-2008, 07:34 AM
You should not need to alter anything within your php.ini file in order to send mail using the mail() function.

Besides that, any PHP scripts that depend on information in the php.ini file will need to have a php.ini file within its directory. However, I prefer to just generate the PHP5 Single PHP.INI file using 'Software/Services' > 'PHP Config' within cPanel. After the php.ini.default file is generated in your ~/public_html/ directory, simply delete the old php.ini file and rename the new one to php.ini. Your new php.ini will apply to the root and all subdirectories.