User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,086 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,368 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 344 | Replies: 2
Reply
Join Date: Jul 2008
Posts: 5
Reputation: steveg1965 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
steveg1965 steveg1965 is offline Offline
Newbie Poster

CODOSYS workaround

  #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?

<%
'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 5:04 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 756
Reputation: R0bb0b is on a distinguished road 
Rep Power: 2
Solved Threads: 59
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Master Poster

Re: CODOSYS workaround

  #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 6: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
Reply With Quote  
Join Date: Jul 2008
Posts: 5
Reputation: steveg1965 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
steveg1965 steveg1965 is offline Offline
Newbie Poster

Re: CODOSYS workaround

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:50 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC