We help IT Professionals succeed at work.

brainjar script only works sometimes

rivkamak
rivkamak used Ask the Experts™
on
I have the brainjar formmail on all my websites.
They all site on the same dedicated server - windows IIS7.

I have no problem with the script, except strangly enough, it doesn't work on 1 site. The script runs and I get to the thank you page, but I don't receive an email. If I copy those pages onto another site, it works just fine.

Is there some smtp setting that is not set up correctly on this site level?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
show the code that is acting up.

Author

Commented:
 <form action="cgi-bin/formmail.asp" method="post" name="form1" id="form1">
      <!-- <input type=hidden name="_recipients" value="lauren.gluck@jewishlittlestar.org,yehoshua.weinstein@oorah.org,raizel.hoffman@oorah.org" /> -->
      <input type=hidden name="_recipients" value="debs2830@gmail.com" />
      <input type=hidden name="_subject" value="Little Star Application" />
      <input type=hidden name="_redirectUrl" value="../thankyouapp.html" />
<input name="LastName" type="text" id="LastName" value="123" />
<input type="submit" />
</form>

Open in new window


The brain jar code is a regular form code
	mailComp   = "CDO"
	
	fromAddr   = "***@jewishlittlestar.org"

	allowedHosts      = Array("www.jewishlittlestar.org", "jewishlittlestar.org")
	allowedRecipients = Array()
	allowedEnvars     = Array("HTTP_USER_AGENT", "REMOTE_ADDR", "REMOTE_USER")

Open in new window

Top Expert 2011

Commented:
Do you have access to that dedicated server you alluded to?

If yes, can you verify that smtp server is installed and setup up?

To do this, go to iis, right-click on smtp server, click on properties, click on Access tab, click on Relay.

Be sure "Only below listed" radio box is checked.

Then inside that box, be sure that it reads, Granted 127.0.0.1

Try this and see what happens.

Also, please verify once more that you are using correct email address.

if you have already tried this, let me know.

Author

Commented:
I do have access to the server.
But is this set up on the server level or site? Because the smtp works just fine on the other sites on the server
Top Expert 2011

Commented:
This is setup on the server level.

Also, I hope there is a whole lot more than these lines:

      mailComp   = "CDO"
      
      fromAddr   = "***@jewishlittlestar.org"

      allowedHosts      = Array("www.jewishlittlestar.org", "jewishlittlestar.org")
      allowedRecipients = Array()
      allowedEnvars     = Array("HTTP_USER_AGENT", "REMOTE_ADDR", "REMOTE_USER")

Author

Commented:
it's the whole brainjar formmail.
you want me to paste 600 lines of code?
Top Expert 2011

Commented:
lol, no of course.

I just want to make sure you have some lines such as:

 smtpServer = "localhost"
and
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"

Author

Commented:
Does CDONTS vd CDO work on site level:

The CDONTS works on the 1 site, but on this  site, when I use cdonts
I get this error:
ActiveX component can't create object
Top Expert 2011
Commented:
That means that you will need to download and install cdonts.dll as it is not available after server 2003.

Your code suggests you use cdo. Are you trying to switch to cdonts?

Anyway, please grab cdonts.dll from this link and follow their installation and configuration instructions.

http://www.jppinto.com/2009/03/install-cdonts-mail-component-and-smtp-on-windows-server-2008/