Jump to content


Photo

MAIL from Win2003 server and IIS6


  • Please log in to reply
4 replies to this topic

#1 tbailey

tbailey
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 23 March 2006 - 03:35 AM

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.


#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 23 March 2006 - 04:12 AM

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 maximum amount of info you can - this one looks like a needle in a haystack jobbie...
follow me on twitter @PHPsycho

#3 neylitalo

neylitalo
  • Staff Alumni
  • Advanced Member
  • 1,854 posts
  • LocationMichigan, USA

Posted 23 March 2006 - 04:54 AM

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.
http://nealylitalo.net - My personal website, and home of The Netizen's Journal.

#4 tbailey

tbailey
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 23 March 2006 - 03:23 PM

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.

#5 tbailey

tbailey
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 24 March 2006 - 06:01 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users