CDONTS & DHCP Send e-mail examples

Source: Internet
Author: User
Tags servervariables
CDONTS & DHCP Send e-mail examples
I have developed code using ASP and CDONTS which'll send an email to the person requesting the information.
The Site Visitor ' s DHCP IP
Date/time
The Region from Where the Visitor has Made a Hit like India, US etc
Which Browser is being used
******************************
<%
' Code by Manikantan
' Web Developer
' 3rd Agenda
' Nungambakkam
' Chennai
' India
Dim ripaddress
Dim uagent
Dim Strgettime
ripaddress = Request.ServerVariables ("REMOTE_ADDR")
Reg=split (Ripaddress, ".")
' Check for American regions
' Increase the Numbers into subdomains to find the Exact Location
If CInt (Reg (0)) <=207 and CInt (Reg (0)) >=204 Then
Region= "North America or South America or Caribbean or Saharan Africa"
End If
If Reg (0) = "196" or reg (0) = "198" or reg (0) = "199" or reg (0) = "" or reg (0) = "216" or reg (0) = "a" or reg (0) = "209" Then
Region= "American regions inclucding Caniberra and Saharian region"
End If
' Check for Asian regions
' Increase the Check for accuracy
If Reg (0) = "a" or reg (0) = "203" or reg (0) = "210" or reg (0) = "211" or reg (0) = "169" or reg (0) = "" or reg (0) = "then"
Region= "Asian Pacific region like India,afghan"
End If
If region <> "Asian Pacific region like India,afghan" then
If region<> "American regions inclucding Caniberra and Saharian region" thenregion= "European Region,north Africa, Russian region "
End If
End If
Uagent = Request.ServerVariables ("Http_user_agent")
Strgettime = FormatDateTime (now (), vblongdate)
' You need Cdonts.dll for this
' Anyother Mailer like Abmailer.dll can be used instead
Dim MyMail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.