Forum Moderators: coopster

Message Too Old, No Replies

No sendmail - PHP script alternative?

Can I do this through the script and not the php.ini?

         

gothbabe55

8:21 pm on Jan 20, 2003 (gmt 0)

10+ Year Member



Hi

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?

Knowles

8:41 pm on Jan 20, 2003 (gmt 0)

10+ Year Member



Are they providing a script (Perl CGI PHP etc) or a program? If its a program I would think you could just change the sendmail calls in your script to be that program instead depending on how it works. Can you provide any more detail as to whats going on?

ps. Welcome to WebmasterWorld!

dingman

10:26 pm on Jan 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try just telling your host that they have PHP misconfigured and need to set the sendmail path in php.ini. It might work. It even should. :)

I just looked at ini_set(), but that isn't one you're allowed to change from a script.

gothbabe55

10:53 am on Jan 21, 2003 (gmt 0)

10+ Year Member



Hi Guys

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.

dingman

1:58 pm on Jan 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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.

Knowles

3:15 pm on Jan 21, 2003 (gmt 0)

10+ Year Member



'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.

hakre

10:51 pm on Jan 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if you want to go around all the sendmail and php mail() issues, send the mail simply on your own. use phpmailer [phpmailer.sourceforge.net] (a mailing class with lots of sending options including direct connect to an smtp server) and you're fine.

gothbabe55

9:42 am on Jan 22, 2003 (gmt 0)

10+ Year Member



SMTP is fine, but the sendmail_path has been disabled. hakre, that link you sent looks pretty promising - I will have a look at that in greater detail. Thanks!