|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am using JMail to send emails to users for specific reasons but I keep getting an
ERROR 500 Page Can Not Be Displayed I have included the code below please help. ' Email Body Format strBody = "Contact - " & strDate & vbCrLf & vbCrLf strBody = strBody & "Reason: " & strReason & vbCrLf strBody = strBody & "Full Name: " & strName & vbCrLf strBody = strBody & "Email Address: " & strEmail & vbCrLf strBody = strBody & "Comments: " & strComments & vbCrLf strBodyB = strBody '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++ ' EMAIL using JMAIL Dim JMail Set JMail = Server.CreateObject("JMail.SMTPMail") JMail.ServerAddress ="mail.myserver.com" JMail.Sender = "name@myserver.com" JMail.Subject = strReason JMail.AddRecipient strEmail JMail.ContentType = "text/html" JMail.Body = strBodyB JMail.Priority = 3 JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR") JMail.LazySend = True JMail.Execute() JMail.Close() I am aware of server address and sender fields. |
|
#2
|
|||
|
|||
|
In order to see the REAL error message, as opposed to the SERVER 500 error.
Goto Tools-->Internet Options-->Advance(TAB)-->Uncheck Show Friendly HTTP error messages Refresh your .asp page and you *should* see the proper error message. This should help you pinpoint the exact place in your code were you're getting the error. Another solution/approach would be to have, at the top of your page, the instruction On Error Resume Next and towards the bottom, or in the exact place you *think* you might have an error, place this code portion: If Err.number <> 0 Then Response.Write "Number : " & Err.number & "<br>" Response.Write "Description : " & Err.Description & "<br>" Response.Write "Source : " & Err.Source & "<br>" Response.End End If Remember, once you've found/corrected your error you should COMMENT these instruction. Hope this helps! Sincerely Vlince |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > JMail Issue (Urgent) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|