PHP Mail on Windows

Ok I’ve been reading threw the little available information on this and comming to a bit of a dead end. As nearly as I can tell the only way to use the mail function on a windows host is to pass an smtp host in the php.ini file. Also as nearly as I can tell I have no direct or any for that matter access to the php.ini file. How can I go about setting it up to work threw a different smtp server than localhost which unfortunatly will not work on windows. Thanks :slight_smile:

I’m sure there is another way because this forum used to run on Windows and the mailer function it had worked fine without any special modifications. I believe LazyX actually was able to extract the function it uses. We don’t have any PHP programmers so I really can’t help you out in that. But it is possible as we have many customers using mailing routines in PHP (on windows). Try posting this on http://www.phpbuilder.com

the forum section actually:
http://www.phpbuilder.com/board/

I think what you guys have to do is open the php.ini file located on your servers. I believe it would be in c:\winnt\php.ini, and modify the smtp setting to mail.jodohost.com and restart the apache server. I believe this would fix the problems anyone might have with mail on windows servers :slight_smile:

Stewart,

That is entered into our php.ini file and it has nothing to do with it. PHP has issues when you run it on Windows. On Linux, you can simply use the mailer function and send out an email without any host parameters. But that is not possible on windows as Windows SMTP requires authentication. You need to look for some other PHP mailing routine that can accept parameters. We are not PHP developers so I can’t really help you with that. I suggest once again you post this at http://www.phpbuilder.com/board/
You’d be able to receive a response about this within no time from other PHP developers running mailing routines on Windows.

I talked to them and thats what they said to do. They told me the windows php.ini file had to be modified to be like that. Thanks anyway.

Would it be possible to switch my account to linux? I’m only using php anyway. Thanks :slight_smile:

Ok. What page is this script located at? I’d have this passed through our Windows administrator and see what he has to say.

[QUOTE=Stewart]
Would it be possible to switch my account to linux? I’m only using php anyway. Thanks :slight_smile:
[/QUOTE]

The system isn’t designed to switch you between servers. You could signup for a new linux trial account and shift all your files and domains there. Once done, you could submit a ticket requesting closure of your old account and crediting the funds from it to your new account

[QUOTE=Yash]
The system isn’t designed to switch you between servers. You could signup for a new linux trial account and shift all your files and domains there. Once done, you could submit a ticket requesting closure of your old account and crediting the funds from it to your new account
[/QUOTE]

Ok. Is a new trial account free so I don’t have to pay out for it? Thanks :slight_smile:

[QUOTE=Stewart]
Ok. Is a new trial account free so I don’t have to pay out for it? Thanks :slight_smile:
[/QUOTE]

Of course.

Ok. I setup the trial account with cedit.jodohost.com. How do I transfer my domain http://www.ceditpro.com to the trial account. The files won’t be a problem to transfer. Also how can I transfer the database in use? Thanks :slight_smile:

Database is going to be a problem. You’d have to recreate that as well as there would be no way to transfer

[QUOTE=Stewart]
Ok I’ve been reading threw the little available information on this and comming to a bit of a dead end. As nearly as I can tell the only way to use the mail function on a windows host is to pass an smtp host in the php.ini file. Also as nearly as I can tell I have no direct or any for that matter access to the php.ini file. How can I go about setting it up to work threw a different smtp server than localhost which unfortunatly will not work on windows. Thanks :slight_smile:
[/QUOTE]

I just looked up “groups.google.com” and found this:
$result = ini_set(SMTP, “smtp.mysite.com”);

I even tested this by substituting my server and it works!

Yeah I managed to find that but I was running into one problem with it. Was exceedingly slow for some reason. Tried it like 10 times and it was taking around 2 mins to submit. Were you experiencing such difficulties?

[QUOTE=Stewart]
Yeah I managed to find that but I was running into one problem with it. Was exceedingly slow for some reason. Tried it like 10 times and it was taking around 2 mins to submit. Were you experiencing such difficulties?
[/QUOTE]

No, it worked fast in my case. But once, it completely failed to deliver the message, though there was a success returned.