ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 30th, 2003, 01:25 PM
McSqueeb McSqueeb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 1 McSqueeb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question JMail Issue (Urgent)

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.

Reply With Quote
  #2  
Old July 31st, 2003, 07:28 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > JMail Issue (Urgent)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway