I'm new to this community and so please be gentle with me as I figure out how it works, where things are, and what the general polity is.

Situation: Our non-profit's website is hosted in a Windows environment. CGI is not available to me, but there is an ASP mail feature. I'm guessing that if they "give" me that, I can upload another ASP mail utility and do it better. Website has email addresses listed and we're already starting to get spam. I was warned, and the guy that built the site was warned by several folks (including me), but was not willing to explore possibilties before getting the site "live". Live and delete spam, I guess.

Site was built and is maintained in Dreamweaver.

What I want to do is to employ a mail form to allow visitors to the site to contact one of three officers or the webmaster, to choose "Question, Comment, Opinion, Other" by a second dropdown, add their name, email addy, and comments as required fields, and have the data sent to the appropriate address by form rather than by providing an electronically recognizable email address for each of the folks. All this without providing fodder for the webcrawlers!


Can I do this in ASP, or do I need to be looking elsewhere?

Do I need to be POSTING elsewhere to ask this?

Can this be done in an elegant fashion or are we stuck with leaving the email addies on the site?

Have I left anything else out that would help me fix this or to ask it in a more easily digested way?

Please, oh PLEASE do not answer in tech-ese or in Geek. I don't always understand deeply technical. As I said earlier, be gentle with me. I execute instructions well, so long as I can understand them! :cool:

Thanks in advance!

10 Years
Discussion Span
Last Post by msaqib

Here is a simple email function which you can use to send the emails from the web forms. For the spam i would suggest you not to disclose that page to the search bots. You can hide the direct html link of that page and use the javascript, so that only the visitor can access that page by clicking on the link. i.e.

<a href="#" onclick="window.open('url')">Email Form</a>

And here is the ASP function to use.

Function Sendmail(MailFromAddr, RecipientAddr, cSubject, strMsgInfo, sCc, sBcc, iPriority, RecipientName, cMailHost,cMailFromName,attachment,HTMLMail) 

IF instr(strMsgInfo,"<")<>0 then ' This is HTML content





On Error Resume Next

'Dimension variables

Dim objCDOSYSCon

'Create the e-mail server object

Set objCDOSYSMail = Server.CreateObject("CDO.Message")

Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

'Set and update fields properties

'Out going SMTP server

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost

'SMTP port

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

'CDO Port

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2


objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 600

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password


'Update the CDOSYS Configuration

Set objCDOSYSMail.Configuration = objCDOSYSCon

'Who the e-mail is from

objCDOSYSMail.From = "<" & MailFromAddr& ">"

'mail carbon copy

objCDOSYSMail.Cc = "<" & sCc & ">"

objCDOSYSMail.Bcc = "<" & sBcc & ">"

'Who the e-mail is sent to

objCDOSYSMail.To = "<" & RecipientAddr& ">"

'The subject of the e-mail

objCDOSYSMail.Subject = cSubject

If CBool( HTMLMail ) Then

objCDOSYSMail.HTMLBody = strMsgInfo


objCDOSYSMail.TextBody = strMsgInfo

End If 

'Send the e-mail


'Close the server mail object

Set objCDOSYSMail = Nothing
End Function
This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.