473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

NewMailobj.Send gives me 500 INTERNAL ERROR

I keep getting this error on my form code, but only when I keep the MailNewObj.Send in the code, so I know it is this... I get the 500 INTERNAL ERROR message.. I tried shutting off "friendly messages" in IE, but it still winds up with the same message... I am publishing to GoDaddy and the GoDaddy server is ASP/LINUX since I wanted a combination of both... GoDaddy mentioned I should add the following lines, somewhere in my code:OUTGOING SERVER = relay-hosting.secureserver.net

Any help would be appreciated...

ENTIRE CODE:
<%@ Language="VBscript" %>
<% Option Explicit %>

<html>
<head>
<title>Message Sent</title>
</head>

<body>
<%
'declare the variables that will receive the values
'receive the values sent from the form and assign them to variables
'note that request.form("name") will receive the value entered into the textfield
'called name, and so with email and message
Dim first, last, phone, email
Dim eventdate, eventtype, eventlocation, message, NewMailObj

first=request.form("first")
last=request.form("last")
phone=request.form("phone")
email=request.form("email")
eventdate=request.form("eventdate")
eventtype=request.form("eventtype")
eventlocation=request.form("eventlocation")
message=request.form("message")

'create the mail object and send the details
Set NewMailObj=Server.CreateObject("CDONTS.NewMail")
NewMailObj.From = "events@settevideoproductions.com"
NewMailObj.To = "events@settevideoproductions.com"
NewMailObj.Subject = "NEW MESSAGE FROM SETTEVIDEOPRODUCTIONS.COM"
NewMailObj.Body = "First Name: " & first & _
"<br>Last Name: " & last & _
"<br>Phone: " & phone & _
"<br>E-mail: " & email & _
"<br>Event Date: " & eventdate & _
"<br>Event Type: " & eventtype & _
"<br>Event Location: " & eventlocation & _
"<br>Message: " & message

'you need to add the following lines FOR the mail to be sent in HTML format
NewMailObj.BodyFormat = 0
NewMailObj.MailFormat = 0
'The next line gives me an error if I keep it in... it is necessary to send the mail out
NewMailObj.Send

'Close the email object and free up resources
Set NewMailObj = nothing
Response.Redirect "http://www.settevideoproductions.com/thankyou.html"
%>

</body>
</html>
Dec 4 '08 #1
1 3588
CroCrew
564 Expert 512MB
Hello Michael31277,

Try using this code in place of the code you pasted.

Hope this helps,
CroCrew~

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <title>Message Sent</title>
  4.     </head>
  5.     <body>
  6.         <%
  7.             Function MailBody()
  8.                 MailBody = "--- Information --" & vbCrLf
  9.                 MailBody = MailBody & "First Name: " &         Request.Form("first") & vbCrLf
  10.                 MailBody = MailBody & "Last Name: " &         Request.Form("last") & vbCrLf
  11.                 MailBody = MailBody & "Phone: " &             Request.Form("phone") & vbCrLf
  12.                 MailBody = MailBody & "Email: " &             Request.Form("email") & vbCrLf
  13.                 MailBody = MailBody & "Event Date: " &         Request.Form("eventdate") & vbCrLf
  14.                 MailBody = MailBody & "Event Type: " &         Request.Form("eventtype") & vbCrLf
  15.                 MailBody = MailBody & "Event Location: " &     Request.Form("eventlocation") & vbCrLf
  16.                 MailBody = MailBody & "Message: " &         Request.Form("message") & vbCrLf
  17.             End Function
  18.  
  19.             Set myMail=CreateObject("CDO.Message") 
  20.             myMail.Subject = "NEW MESSAGE FROM SETTEVIDEOPRODUCTIONS.COM" 
  21.             myMail.From = "events@settevideoproductions.com" 
  22.             myMail.To = "events@settevideoproductions.com" 
  23.             myMail.TextBody = MailBody()
  24.  
  25.             On Error Resume Next  
  26.                myMail.Send     
  27.                If Err <> 0 Then  
  28.                   Response.Write("Error occurred: " & Err.Description) 
  29.                else 
  30.                   Response.Write("Your message was sent successfully.") 
  31.                   Response.Redirect "http://www.settevideoproductions.com/thankyou.html"
  32.                End If 
  33.             Response.End         
  34.         %>
  35.     </body>
  36. </html> 
  37.  
Dec 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Andrew | last post by:
(I've made two previous attempts to post this using MSDN's web interface, but it doesn't seem to be working. I've switched to a newsreader, but I apologize for the duplication if the other posts...
0
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after...
4
by: David Sworder | last post by:
Consider the following line of code (it's not important what it does): resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase); It turns out that this line is in error. The...
13
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send...
1
by: michi | last post by:
Hi there.... Got here a tricky thing with my SMTP. First I show you what works on my machine.. **This Works** SmtpMail.SmtpServer = "mail.gmx.net" <-gmx is my mail provider...
14
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class...
1
by: sxwend | last post by:
I am trying to use the following post results (http://www.thescripts.com/forum/thread189759.html) and add another requirement. I need to send the results to just the email addresses that the query...
2
by: devgupta01 | last post by:
I have two files - test.jsp and error.jsp <<test.jsp>> <<error.jsp>> when i send the request to page test.jsp then it gives HTTP 500 Internal Server Error. I get error only if I first...
3
by: graphicssl | last post by:
Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial! ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.