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!

Error 550 generated while performing CDONTS.NewMail") 2

Status
Not open for further replies.

pbanacos

IS-IT--Management
Apr 21, 2006
34
US
Hello,

I changed domain providers recently and ever since I pointed the records to the new server the 'contact us form' gives me the following error:


Most likely causes:
•The website is under maintenance.
•The website has a programming error.

What you can try:
Refresh the page.

Go back to the previous page.

More information

This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

For more information about HTTP errors, see Help.


Here is the code snippet from the form found on page 1 (index.asp)
---------------------------------------------------
<form method="post" action="email_send.asp">
<label><span class="text_formSide">Name</span><br />
<input type="text" name="name" id="name" />
</label>
<br />
<label><span class="text_formSide"><br />
Email </span><br />
<input type="text" name="email" id="email" />
</label>
<br />
<br />
<input name="B1" type="button" class="button" onclick="validateForm()" onmouseover="this.className='buttonon'" onmouseout="this.className='button'" value="Send" />
</form></td>



Snippet from email.send.asp
-----------------------------------------------------


<%@ LANGUAGE=VBSCRIPT %>
<% Option Explicit %>
<%

'for email
Dim objMail

'from form
Dim strName,strEmail



strName =Request("name")
strEmail =Request("email")



'Response.Write "Name is:"
'Response.Write (strName)




'build transaction email to send to Administrator
'--------------------------------------------------------------------------------------------
Set objMail=Server.CreateObject("CDONTS.NewMail")
'Set objMail = Server.CreateObject("CDO.Message")

objMail.to="mydomain@mydomain.net"


objMail.From= strEmail

objMail.Subject="Email Sent from Direct Fuel | Sign up"

'objMail.TextBody= "Name: " & strFirstName & vbcrlf&_
objMail.Body= "Name: " & strName & vbcrlf&_

"Email: " & strEmail & vbcrlf

objMail.Send

Set objMail=nothing



Response.Redirect "thanks.asp"



%>


Does this sound like a permissions issue on the new hosts server. To test I pointed back to the old server the forms work fine again?

Many Thanks,
PB
 
You have a mix of languages here.

In the form, you're using javascript. On the Server side, you are using vbscript. So be careful there. ' is a comment character in vbscript.

Is your new server asp enabled? Try a simple hello world program to establish this.
 
Thanks for the solution. It worked once I uploaded a new VBscript below:



<%@ LANGUAGE=VBSCRIPT %>
<%

Dim objMail

Dim strName, strEmail

strName =Request("name")
strEmail =Request("email")

Set ObjMail = Server.CreateObject("CDO.Message")


objMail.Configuration.Fields(" = 2
objMail.Configuration.Fields(" = "localhost"
objMail.Configuration.Fields.Update()

objMail.From = Trim(Request.Form("email"))
objMail.To = "name@mydomain.net"
objMail.Subject = "Email Sent from ABC | Sign up"
objMail.TextBody = "A form has been filled out and submitted. " & vbcrlf & "Name: " & strName & VBCrLf & "Email: " & strEmail


objMail.send()

Set ObjMail = Nothing

response.redirect("thanks.asp")


%>

Thanks,
PB
 
CDONTS is no longer supported on Windows and hasn't been for five or six years.

You need to be using CDOSYS instead.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
BTW a 550 error is a SMTP mailing error which you would NOT get when running the script.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top