Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Authentication/Restricting access question...

Status
Not open for further replies.

aamaker

Programmer
Joined
Jan 20, 2002
Messages
222
Location
US
I would like to use ASPEmail, ASPmail, Jmail or some other mail component to have notification sent to me when a login attempt fails.

I've used UD's User Authentication to setup restricted access to the administrative control panel of my site...

to be specific, I want the username/password login page to 'trigger' the mailing of a predefined message/alert to me using a mail script...

is this do-able?

I'm pretty advanced with UD, but have to be honest, Im trudging through ASP - so not a LOT of deep knowledge there - but if this is do-able - I think with some tips from you guys on how to piece it all together I could get it done.

Thanks!
 
It sure is.

Obviously, if you are checking a username/password you will end up with a true/false situation as to whether or not the person is authorised.

If they have failed the login, lob this bit of code for CDONT in there...changing it where necessary

' Create a new mail object
Set oMailMessage = server.CreateObject("CDONTS.NewMail")
oMailMessage.To = "you@yourdomain"
oMailMessage.Value("Reply-To") = "you@yourdomainu"
oMailMessage.From = "Your Real Name"
oMailMessage.Subject = "Login Failure"
oMailMessage.importance = cdoNormal
oMailMessage.Body = "In this area you could include the details of username, password, date etc"

' Now send it off!

oMailMessage.Send

set oMailMessage = nothing

I have this piece of code in several places, a page that traps spammers (try it if you dare - be warned, it will use javascript to lock up your browser). I used to have it on my error 404 page, but Code red put a stop to that, I was getting over 1000 emails a day when it was probing.

Good luck



Steve Davis
hey.you@hahaha.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top