Forum Moderators: coopster

Message Too Old, No Replies

can php mail be turned off?

         

surrealillusions

5:38 pm on Feb 11, 2008 (gmt 0)

10+ Year Member



Trying to setup an email form, but the website is on another server. I know it works as i use the exact same script (albeit with different fields) on my own site hosted elsewhere.

Can the send mail within php be turned off at all server side? If so, how do you turn it back on?

:)

jatar_k

5:52 pm on Feb 11, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you can disable any function you like in php.ini

sendmail isn't part of php though, php just uses the mail on the server, if mail isn't conf'ed then it will not be available

take a look at your phpinfo and see what it says

surrealillusions

6:16 pm on Feb 11, 2008 (gmt 0)

10+ Year Member



Ok..have checked the phpinfo on both sites/servers.

On mine, where it works..

sendmail_from - no values
sendmail_path - has a value in it.

On the site/server where it doesn't, its the other way round.

Those are the only mail options on both phpinfo's.

:)

jatar_k

6:22 pm on Feb 11, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you can find explanations of the settings here
[php.net...]

looks like they need to add a path

surrealillusions

6:50 pm on Feb 11, 2008 (gmt 0)

10+ Year Member



ok..thanks

will look into it

:)

surrealillusions

8:58 pm on Feb 11, 2008 (gmt 0)

10+ Year Member



For future reference and for anyone who stumbles upon this topic in the near and far future.

If you cant alter your php.ini file and are running on a windows server, then you need to add this line before you set the email -

// Set ini command for windows server. change the email and domain according to the website
ini_set("sendmail_from", " email@example.com ");

Hope that helps anyone!

:)