Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP mail not working in chrome?

Status
Not open for further replies.

sdagger2

Programmer
May 5, 2008
39
GB
Hi

I have programmed many sites in asp using the cdosys and cdo.message for contact forms etc. I am now finding that none of the forms are working in chrome? they have worked fine in IE, Firefox etc but not in chrome. Can anybody help as to why this may be and is there a fix I can do? I have about 15 sites using similar code to the below which works in most browsers. Why would chrome treat this code different?

Many thanks for anyone who can help me solve this problem. The code I know works is:

Dim objMail
Set objMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")

objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
objConfig.Fields(cdoSMTPServer)="auth.smtp.domain.co.uk"
objConfig.Fields(cdoSMTPServerPort)=25
objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic
objConfig.Fields(cdoSendUserName) = "username"
objConfig.Fields(cdoSendPassword) = "password"

'Update configuration
objConfig.Fields.Update
Set objMail.Configuration = objConfig
objMail.From = Request("email")
objMail.To = "somemail@somemail.co.uk"
objMail.Subject = "some subject"
objMail.TextBody = "some text"
objMail.Send
 
ASP runs on the server, so the browsers being used should make absolutely no difference to server side mailing.


If the problem only appears in chrome it MUST be a problem with something clientside.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
 
So like the smarta*** said .... clientside :D

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
 
Hi

Yes thats what threw me? why was it not working in chrome when the email code is serverside? after discussions on the wrox forums I ended up identifying the problem was the validation submission with JavaScript. All it was (return true;). As simple as that and I didn't know chrome would kick up a fuss.

Thanks for your help guys.
 
I see this in your reply there.
>It was just a case of adding return true; to the javascript function just before the document.contactform.submit(); in the validation.
This has dubious sense implying you might not completely understand what you were told there and/or the functioning or the return in a function. You should simply take out the .submit() line and replace it by return true. All lines after the last "return" is meaningless even they are still subject to syntax checking.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top