| | |
CODOSYS workaround
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2008
Posts: 5
Reputation:
Solved Threads: 0
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?
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)
<% 'sets form variables dim sendtoemail, sendtoname, sentfromname, sentfromemail, messagesubject, messagebody, url, Email_SMTPAddress, Email_ServerComponent sendtoemail = request.form("sendtoemail") sendtoname = request.form("sendtoname") sentfromname = request.form("sentfromname") sentfromemail = request.form("sentfromemail") messagesubject = request.form("messagesubject") messagebody = request.form("messagebody") url = request.form("url") Email_SMTPAddress = request.form("Email_SMTPAddress") Email_ServerComponent = request.form("Email_ServerComponent") 'sets message body for inc_sendtofriendmanager If request.form("form") = "SendToFriendManager" Then messagebody = messagebody & vbCrLf _ & vbCrlf & "Here is the link" _ & vbCrlf & url _ & vbCrlf End if 'sets message body for inc_sendreplymanager If request.form("form") = "SendReplyManager" Then messagebody = messagebody & vbCrLf _ & vbCrlf End if Set sendmail = Server.CreateObject("CDO.Message") Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration") Set Flds = objCDOSYSCon.Fields 'Out going SMTP server objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtp-au.server-mail.com objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objCDOSYSCon.Fields.Update set sendmail.Configuration = objCDOSYSCon sendmail.From = sentfromemail'The mail is sent to the address declared in the form variable. sendmail.To = sendtoemail sendmail.Subject = messagesubject & ": sent from " & sentfromname ' The subject is set in the form variable 'This is the content of thr message. sendmail.TextBody = messagebody sendmail.Send 'Send the email! 'Close the server mail object Set sendmail = Nothing Set objCDOSYSCon = Nothing Response.Redirect( Request.ServerVariables("HTTP_REFERER") & "&sent=yes&sendtoemail=" & sendtoemail) %>
Last edited by peter_budo; Jul 13th, 2008 at 6:04 am. Reason: Keep It Organized - please use [code] tags
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.
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.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Creating elements with dynamic id's in IE
- Next Thread: Problem with page link.
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser captchaformproblem cart checkbox child class close codes css date debugger decimal dependent design disablefirebug dom editor element embed engine enter events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onerror onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post programming prototype rated redirect runtime safari scale scriptlets scroll search security session shopping size software star starrating stars synchronous toggle unicode variables web webservice wysiwyg \n





