We help IT Professionals succeed at work.

brainjar script only works sometimes

rivkamak used Ask the Experts™
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?
Watch Question

Do more with

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

show the code that is acting up.


 <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" />

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

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

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.


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

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")


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

lol, no of course.

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

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


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
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.