Forum Moderators: coopster
I know this question has been posted before, but the answer turned out not to be forthcoming. My host has disabled sendmail, but they have a replacement program for emailing. I have the path info of the replacement, but obviously I cannot edit the php.ini as this is not my system. Is there anyway I can specify this information in my actual php script?
Thanks for the welcome, and thanks for the replies :)
It is an actual program, not a script, that is the replacement for sendmail. The path they have given is 'd:/www/windmail/windmail.exe'
dingman, smooth move and all, but I don't think that will work as they have deliberately disabled sendmail....
Knowles, would I be able to send you a copy of my script to see about inserting something to change the mail() function to use the above program instead? It would be much appreciated.
I don't think that will work as they have deliberately disabled sendmail....
Which is why they need to change the path in php.ini. Nothing is at all wrong with using a different MTA, but they need to put the path to the one they are using in the 'sendmail path' PHP setting. it's just called a 'sendmail' path because Sendmail is the default. In this case, it sounds like 'sendmail_path = d:/www/windmail/windmail.exe' would probably do the trick.
There's also an SMTP host setting in php.ini that is intended for use on Windows installations of PHP. The mail() function will not work unless either 'sendmail_path' is the path to a working mail-transport-agent or 'SMTP' is the path to an SMTP server that will relay for the machine PHP is running on.
If they won't set one of those so that the PHP mail() function works, then they should be replaced with a competent host.
'd:/www/windmail/windmail.exe'
This a windows host giving you PHP or a Unix host using windows locations and programs? The mail() will work as long as a path is set as stated if this is a windows host thats probably their SMTP which should be set in the ini. Other wise I am not sure what they are doing and I would say go with another host.