CODOSYS workaround

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jul 2008
Posts: 5
Reputation: steveg1965 is an unknown quantity at this point 
Solved Threads: 0
steveg1965 steveg1965 is offline Offline
Newbie Poster

CODOSYS workaround

 
0
  #1
Jul 11th, 2008
Hi Guys,

As my ISP does support .asp but not CODOSYS, I was hoping someone might be able to help me convert this into simple .asp email script or something?

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <%
  2. 'sets form variables
  3. dim sendtoemail, sendtoname, sentfromname, sentfromemail, messagesubject, messagebody, url, Email_SMTPAddress, Email_ServerComponent
  4. sendtoemail = request.form("sendtoemail")
  5. sendtoname = request.form("sendtoname")
  6. sentfromname = request.form("sentfromname")
  7. sentfromemail = request.form("sentfromemail")
  8. messagesubject = request.form("messagesubject")
  9. messagebody = request.form("messagebody")
  10. url = request.form("url")
  11. Email_SMTPAddress = request.form("Email_SMTPAddress")
  12. Email_ServerComponent = request.form("Email_ServerComponent")
  13. 'sets message body for inc_sendtofriendmanager
  14. If request.form("form") = "SendToFriendManager" Then
  15. messagebody = messagebody & vbCrLf _
  16. & vbCrlf & "Here is the link" _
  17. & vbCrlf & url _
  18. & vbCrlf
  19. End if
  20. 'sets message body for inc_sendreplymanager
  21. If request.form("form") = "SendReplyManager" Then
  22. messagebody = messagebody & vbCrLf _
  23. & vbCrlf
  24. End if
  25.  
  26. Set sendmail = Server.CreateObject("CDO.Message")
  27. Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
  28. Set Flds = objCDOSYSCon.Fields
  29.  
  30. 'Out going SMTP server
  31. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  32. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtp-au.server-mail.com
  33. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  34. objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
  35. objCDOSYSCon.Fields.Update
  36.  
  37. set sendmail.Configuration = objCDOSYSCon
  38. sendmail.From = sentfromemail'The mail is sent to the address declared in the form variable.
  39. sendmail.To = sendtoemail
  40. sendmail.Subject = messagesubject & ": sent from " & sentfromname ' The subject is set in the form variable
  41. 'This is the content of thr message.
  42. sendmail.TextBody = messagebody
  43. sendmail.Send 'Send the email!
  44. 'Close the server mail object
  45. Set sendmail = Nothing
  46. Set objCDOSYSCon = Nothing
  47.  
  48. Response.Redirect( Request.ServerVariables("HTTP_REFERER") & "&sent=yes&sendtoemail=" & sendtoemail)
  49. %>
  50.  
Last edited by peter_budo; Jul 13th, 2008 at 6:04 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: CODOSYS workaround

 
0
  #2
Jul 12th, 2008
Damn look at all that junk, just to send an email.

Sorry, I don't have an answer as I am a php dev. I was just surprised that's all.
Last edited by R0bb0b; Jul 12th, 2008 at 7:24 pm.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 5
Reputation: steveg1965 is an unknown quantity at this point 
Solved Threads: 0
steveg1965 steveg1965 is offline Offline
Newbie Poster

Re: CODOSYS workaround

 
0
  #3
Jul 12th, 2008
Originally Posted by R0bb0b View Post
Damn look at all that junk, just to send an email.

Sorry, I don't have an answer as I am a php dev. I was just surprised that's all.
If you have a good registration and login script with multiple security levels, I would love to see it.

Kind regards,

Steve
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC