EasyMailObject 구성 요소를 사용하여 ASP에서 Exchange Mail 소스 코드를 처리합니다 --- 메일 주제 및 크기를 읽으십시오 (Maillist1.asp)
< %@ language = "vbscript" %>
<%
'******************************************* ***********
'이 파일은 모든 이메일을 나열하고 메일 콘텐츠 표시 창을 빈 창으로 설정합니다.
'저자 : 멀리
'이메일 : [email protected]
'******************************************* ***********
%>
<script language = vbscript>
parent.frmbottom.location.href = "blank.htm"
sub cmdel_onclick ()
'이메일을 삭제하십시오
frmail.submit
종료 서브
</script>
<%
if session ( "straccount") = ""또는 session ( "strpassword") = ""그러면
response.write ( "<html> <title> 오류, 아직 로그인되지 않은 </title> <body> <p align = center> <br> <br> 아직 로그인되지 않은 경우 먼저 로그 아웃하십시오! <br! > <br> ")
response.write ( "<a href = 'login.asp'target = '_ top'> <img src = 'http : //wwwap.net/article/asp/example/2005/logout.jpg'border = 0 >/a> </p> </body> </html> ")
응답. 엔드
끝 If
%>
<html>
<헤드>
<title> 이메일 </title>
</head>
<스타일>
<!-
a {텍스트 결정 : 없음}
->
</스타일>
<body bgcolor = "#008080"text = "#000000">
<%
'메일 서버 주소를 정의합니다
strserver = session ( "strserver")
'계정 정의
straccount = 세션 ( "straccount")
'비밀번호 정의
strassword = session ( "strpassword")
'구성 요소의 다양한 속성을 설정합니다
set pop3 = createobject ( "easymail.pop3.5")
pop3.licensekey = "awa/s19i500r1ax30c0r3100"
pop3.mailserver = strserver
pop3.account = straccount
pop3.Password = strpassword
pop3.preferredbodyformat = 1
pop3.timeout = 120
x = pop3.connect
x <> 0이면
response.write "<p align = center> 연결 오류 :" + cstr (x) + "<br> <br> 관리자에게 문의하십시오."
pop3.disconnect
응답. 엔드
끝 If
x = pop3.downloadmessages (0)
x <> 0이면
응답. "다운로드 오류 :" + cstr (x) + "<br> <br> 관리자에게 문의하십시오"
pop3.disconnect
응답. 엔드
%>를 종료하십시오
<p> <br> </p>
<form name = "frmail"action = "mail_prc.asp"method = "post">
<centre>
<table cellPacing = "0"CellPadding = "0"BorderColor = "#000080"bgcolor = "#fffff">
<tr> <td colspan = 6 align = "center">
<%
'페이지 매김 처리
request.queryString ( "currentPage") = ""인 경우
CP = 1
또 다른
cp = request.querystring ( "currentpage")
끝 If
'총 이메일 수를 얻으십시오
m_count = pop3.messages.count
m_count <= 10이면
pagenum = 1
SD = 1
ed = m_count
또 다른
pagenum = int (m_count/10) +1
clng (cp) <> pagenum이면
LastPage = m_count mod 10
sd = (clng (cp) -1)*10+1
ed = clng (cp)*10
또 다른
sd = (clng (cp) -1)*10+1
ed = m_count
끝 If
끝 If
%>
<font color = "ff00ff"> <%= pop3.messages.count%> </font> 이메일이 있습니다. </td>
<%세션 ( "msgcount") = pop3.messages.count%>
</tr>
<tr>
<td align = "center"> 번호 </td>
<td align = "center"> from/reply </td>
<td align = "center"> 테마 </td>
<td align = "center"> date </td>
<td align = "center"> size </td>
<td align = "center"> select </td>
</tr>
i = sd ~ ed%>의 경우 <%
<tr>
<td align = "center"> <%= i%> </td>
<%
fw = "답장 :"+교체 (pop3.Messages.ITEM (i) .Subject, space (1), "_")
%>
<td>
<%수신기 = pop3.messages.Item (i) .from%>
pop3.messages.ITEM (i) .fromAddr = "" "<%> 인 경우 <%
<a href = "">
<%else
%>
<a href =#onclick = javaScript : window.open ( 'sendmail1.asp? addr = <%= pop3.messages.Item (i) .fromAddr%> & subject = <%= fw%>', 'sendnew', ' 너비 = 600, 높이 = 480, 스크롤 바 = 예 ');>
<%종료 if%>
<%trim (수신기) = ""그런 다음
응답. "익명 </a>"%>
<%else%>
<a href =#onclick = javaScript : window.open ( 'sendmail1.asp? addr = <%= pop3.messages.Item (i) .fromAddr%> & subject = <%= fw%>', 'sendnew', ' 너비 = 600, 높이 = 480, 스크롤 바 = 예 ');>
<font face = "face"size = "2">
<%= pop3.messages.ITEM (i) .From%> </font>
<%종료 if%>
</td>
<td>
<%msgid = pop3.getMessageId (i)%>
<a href = "showbody1.asp? id = <%= msgid%>"target = "frmbottom">
<font face = "face"size = "2">
<%
if trim (pop3.Messages.ITEM (i) .Subject) = ""그러면
응답. "주제 없음"
또 다른
응답. pop3.messages.item (i) .subject
끝 If
%> </font>
</a> </td>
<td> <font face = "宋体"size = "2"> <%= cdate (mid (cstr (pop3.messages.item (i) .date), 6,11))%> </font> </ TD>
<tdwidth = "60"> <font face = "宋体 宋体"size = "2"> <%= pop3.messages.Item (i) .Size%> </font> </td>
<td> <입력 유형 = "checkbox"name = "c <%= i%>"value = "<%= i%>"> </td>
</tr>
<%다음
pop3.disconnect
%>
</테이블>
</센터>
<p align = "center"> <input type = "button"name = "cmdel"value = "delete"> </p>
</form>
<div align = "center">
<table cellPacing = "0"CellPadding = "0"BorderColor = "#ff0080"bgcolor = "#fffff">
<tr> <td> 페이지 </td>
i = 1에서 pagenum%의 경우 <%>
<td> <a href = "maillist1.asp? currentPage = <%= i%>"target = frmtop> <%= i%> </a> </td>
<%next%>
</tr> </table> </div>
</body>
</html>