Email form works on internet site - not on intranet site

By smedleyjo ·

I've got a php form that sends me an email and works fine on my internet site but won't send the email on the intranet site. I'm running iis and have a separate exchange server but not very well-versed on how the mail gets handled. Any ideas to step me thru getting it to send the email on my intranet site?

Thanks in Advance!!

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

What is happening on your intranet

by jpp412 In reply to Email form works on inter ...

When you send the mail do you get an error message?

Collapse -

No Error Message

by smedleyjo In reply to What is happening on your ...

Thanks for the response!

No error message - it confirms the users' form selections by generating a browser window noting that "The Following Info was Sent:" but then doesn't send the email to me. All appears fine to the user but I just don't get the email. The code definitely works because I tested on the internet site with no problems... I'm hoping someone can point me in the right direction.

Thanks again!

Collapse -

Mail Server Setup

by jpp412 In reply to No Error Message

Have you confirmed that you are able to send mail from your intranet mail server through other means?

Assuming that you mail server is in fact able to send mail outside of your intranet then the problem could be that it is operating on a non-standard port number or something.

How are you initiating the email from the form?

Collapse -

What are the settings in the FORM tag?

by ThumbsUp2 In reply to No Error Message

On the Internet, the FORM tag calls the email protocol for THAT server. On the IntAnet, chances are that you don't have the same server specifications. So, calling the same protocol (sendmail, mail, smtp, etc...) won't work.

You may also have a config file that tells PHP what to do with the mail. This might need to be changed as well.

So, as one of the previous posters asked, what are you using to "call" the email function? What's in your FORM tag?

Collapse -

current setup

by smedleyjo In reply to What are the settings in ...

There are some other forms on the intranet that are working ok, although that data is all sent to/from the database.

Here's how this one is setup:

<?php $to_address = "";
$subject = "Form Selections Attached";
$headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n";
mail($to_address, $subject, $email_message, $headers);
?> <p>Here are the details of the Form:</p>
<p><?php echo $message ?>

Thanks for the help!

Collapse -

have you checked...

by m61 In reply to current setup

...the server logs? you said there was no error message, but have you checked the log files to see if there was in fact an error?

Collapse -

Will Check it...

by smedleyjo In reply to have you checked...

When you click "Submit" on the form you get the correct confirmation info in the browser and no errors there, but I'll check the logs also to see if I can spot something.

Everything appears normal to the person filling out the form but it just never sends me the email. Thanks!

Collapse -

Server didn't like default php mail setting

by smedleyjo In reply to Will Check it...

Changed from default to specific mail code settings and all is flying now.

Thanks for the suggestions guys!

Collapse -

to answer

by Holod In reply to Email form works on inter ...

Each <a href=>php form</a> can have different functions. To help you it's necessary to look to your code to try to improve it

Related Discussions

Related Forums