HI, I just finished a client's site which uses a formmail.asp file to send emails to my client from a user's simple form submission. I tested it over and over and it works beautifully from Safari (which is what I use), but will not work from any other browser. I don't get any error messages, but he never receives the form submission in an email. Does anyone know what could be causing this? Thanks so much!!

Whatever Jr.

12-04-2007, 06:08 PM

Show us some code...

Tom

merstace08

12-04-2007, 06:33 PM

Here is the code for the formmail. I was only instructed to customize the lines below 'These are the only lines you will need to change'

'----------------------------------------------------------------------------------------------------
'copyright information
'----------------------------------------------------------------------------------------------------
'Copyright 2002: Sorted Sites http://www.sortedsites.com
'Authors Jonas Tornqvist, David Parkes and Karl Snares
'This script is Freeware, which means you are free to use and modify
'the script for your own use.
'The only condition is this copyright header remain intact and you don't
'try and sell this script for profit without first asking us.
'And of course also ask Matt Wright who wrote the original perl version of Formmail.

'----------------------------------------------------------------------------------------------------
'license agreement - Important
'----------------------------------------------------------------------------------------------------
'By using this script you agree to indeminfy the developers - Sorted Sites of any loss
'or damages that may arise from its use or missue.
'This script is provided as is with all faults - no warranties and no guarantees.
'basically its free - use it at your own risk and cost.
'No warranties and no tech support - if you need help with this don't ask us!
'The documentation is provided as is with all the help we can offer.
'As we develop this script we shall post updates hopefully fix any bugs
'We are not obliged to release any future versions and we might not bother...
'By using this script you accept this license agreement!

'################################################################################################### #
'this is where the code starts for real
'################################################################################################### #

'These are the only lines you will need to change
'----------------------------------------------------------------------------------------------------
strServer = "localhost.com" 'set which smtp server will be used to send the email. enter ip address or domain name. eg: "xxx.xxx.xxx.xxx" or "smtp.your-domain.com"
intPort = 25 'set the smtp port to be used when sending mail (by default port 25 is used)
'Referrer's Array is defined here. Enter the valid domains which may use this script.
url = Array("www.dhi-us.com")'Set which urls that will be accepted. http://xxxxx/
'Seperate multiple domains by commas
'eg: url= Array("www.your-domain.com","your-domain.com","www.my-domain.com")
'computer names can be used instead of domains if this script is being run locally
'eg: url = Array("computername")

'######################################### IMPORTANT NOTICE #########################################
'IMPORTANT: do not modify anything below this line unless you know what you are doing!!
'######################################### IMPORTANT NOTICE #########################################

'----------------------------------------------------------------------------------------------------
'form validation, checks required fields are not null
'----------------------------------------------------------------------------------------------------
for i = LBound(query3) to UBound(query3)
if query3(i) = query2(0) then
if query2(1) = "" then
response.write ("you must enter a valid ") & query2(0)
response.end
end if
end if

'if query2(0) = "agree" then
'if query2(1) <> "on" or query2(1) = "" then
' response.write("You must agree to terms and conditions to enable Formmailv1.3 to execute!")
'response.end
'end if
'end if

'----------------------------------------------------------------------------------------------------
'form validation, checks a valid email address has been specified
'----------------------------------------------------------------------------------------------------
if query2(0) = "email" then
trim(query2(0))
if len(query2(1))<8 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
query2(1) = replace(query2(1), "%40","@")
if instr(query2(1),"@")=0 and instr(query2(1),".")=0 then
response.write query2(1)
response.Write("You must specify a valid ") & query2(0)
response.end
end if
strEmail1 = split(query2(1),"@")
if len(strEmail1(1))<3 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
strEmail2 = split(strEmail1(1),".")
if len(strEmail2(0))<3 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
if len(strEmail2(1))<2 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
end if

'----------------------------------------------------------------------------------------------------
'checks if a smtp port has been specified, if not it uses the default port 25
'----------------------------------------------------------------------------------------------------
if intport <> 25 then
intport = intport
else
intport = 25
end if

And it works when you use it and not when your client is using it? On the same server? And the forms that use formmail.asp are identical? Both of them use the 'get' method?

Tom

merstace08

12-04-2007, 06:52 PM

That's correct, it works when I use it, but not when he uses it or not if I use it from any browser other than Safari.
His site and email is hosted on dotster. the dostster instructions suggested that I try changing the line that says strServer = "localhost.com" to the recipient's email server. I did that as well and it still does not work.