•
•
•
•
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
![]() |
•
•
Join Date: Jul 2008
Posts: 5
Reputation:
Rep Power: 0
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?
<%
'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
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 756
Reputation:
Rep Power: 2
Solved Threads: 59
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 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
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Creating elements with dynamic id's in IE
- Next Thread: Problem with page link.


Linear Mode