<!--
This sample script uses the CDO as NTS Library to
Read e-mail for a specific user.
Leon Braginski & Matt Powell (c)
-->
<%@ LANGUAGE = "VBScript"%>
<%
If (Request.ServerVariables ("request_method") = "POST") Then
Name = Request.Form ("name")
Email = Request.Form ("ename")
Else
' Assume it's get
Name = Request.QueryString ("name")
email = request.querystring ("email")
End If
If (Email = "") OR (Name = "") Then
Response.Write "You have to supply name and email <BR>"
Response.End
End If
Set objsession = Server.CreateObject ("CDONTS. Session ")
Objsession.logonsmtp Name, Email
Set Objinbox = Objsession.getdefaultfolder (1)
If Objinbox is nothing Then
Set collmessages = Nothing
Response.Write "Can" T get folder. <br> "
Objsession.logoff
Response.End
End If
Set collmessages = objinbox.messages
If (collmessages.count = 0) Then
Response.Write "<center> User <b>" & Name & "</b>" & _
"(Email: <b> & email &" </b>) does not have messages "
Response.End
Objsession.logoff
End If
Response.Write "<center> User <b>" & Name & "</b>" & _
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