Jump to content

Archived

This topic is now archived and is closed to further replies.

tbailey

MAIL from Win2003 server and IIS6

Recommended Posts

Please help me :-)

I'm running a webserver: Win2003 w-IIS 6

We have a separate Windows box for email. An SMTP server.
I'd like to use the PHP mail() function to send email messages from webpages (as in submitting forms), but this PHP mail function does nothing. I cannot get the webserver to send mail. The PHP mail functions are coded properly.

Originally I had php.ini pointing to my smtp server (other box), and when this did not work, I set up in IIS an SMTP virtual server on my webserver, and then had this point to my real smtp server. I changed php.ini to point then to localhost for smtp. Still no luck.

Am I missing something?

I have PHP installed. For mail it points to localhost. Localhost sends it to SMTP virtual on local machine, which sends it to real SMTP server on other box, which delivers it to mailbox. What am I missing??

Thanks soo much.

Share this post


Link to post
Share on other sites
Still this one eh???

Weel just looked at the code you posted the other day, no real probs there apart from maybe using extract() on user input (doesn't give you too much control on error checking their input but more importantly less portable code and issues with globals..... enough he says).

OK are you getting errors returned from the script? if you try sending from an e-mail of your own do yet get a mail delivery failure notice?

I know you have set them but what ARE the relevant php settings currently set to?

Give us the [b]maximum[/b] amount of info you can - this one looks like a needle in a haystack jobbie...

Share this post


Link to post
Share on other sites
Does your SMTP server in fact work? I do know that you need to have your SMTP server sending from a registered domain, if you're planning on sending mail outside of your network, and that's a common problem for people without registered domains.

Share this post


Link to post
Share on other sites
Ok. So did some more tests submitting my form. Nothing. However, I checked on the local smtp logs, and there is no logfile there....even though I have logging enabled. Might this mean that the local smtp is never being contacted by the form??

My php.ini file looks as follows (relevant lines):

sendmail_from no value no value
sendmail_path no value no value
SMTP localhost localhost
smtp_port 25 25

The smtp is set to allow anon access from the local IP address.

And yes neylitalo, the servers are both on registered domain. Also, I am only attempting to send internal emails at present.

Thanks so much.

Share this post


Link to post
Share on other sites
I have tried 2 different configuration options for php.ini in my attempt to get this working. However, NEITHER option seems to be working as the local smtp service is generating no logs when my test form is run.

My 2 different php.ini configuration attempts had the SMTP value set as 1. smtp.mycompany.com and 2. localhost . Neither works. My thinking was that either the local service would pick up on the call to the smtp.mycompany.com server and forward it there (in the case of 1.) or the local service would send the mail directly to the recipient (in the case of 2.)

My hunch is that there's something wrong with my php config as it's not even talking to the local service.

i wish i was smart.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.