<% Set pop3 = Server. CreateObject ("JMail. POP3 ")
Pop3.Connect "username", "password", "pop3mail.intels.net"
'Pop3Connection username,Password, POP3Address.
Response. Write ("You have"& Pop3.count &"Email.<Br> ")
If pop3.count> 0 then
Set msg = pop3.Messages. item (1)
ReTo = ""
ReCC = ""
Set Recipients = msg. Recipients
Separator = ","
For I = 0 To Recipients. Count-1
If I = Recipients. Count-1 Then
Separator = ""
End If
Set re = Recipients. item (I)
If re. ReType = 0 Then
ReTo = ReTo & re. name & "(<a href =" "mailto:" & re. EMail & ""> "& re. EMail & "</a> )"&
Separator
Else
ReCC = ReTo & re. name & "(<a href =" "mailto:" & re. EMail & ""> "& re. EMail & "</a>)" & separator
End If
Next
'Obtain all recipients,And storage.
Function getAttachments ()
Set Attachments = msg. Attachments
Separator = ","
For I = 0 To Attachments. Count-1
If I = Attachments. Count-1 Then
Separator = ""
End If
Set at = Attachments (I)
At. SaveToFile ("c: \ intels \ email \ attachments \" & at. Filename)
GetAttachments = getAttachments & "<a href =" "/intels/email/attachments/" & at. Filename & ""> "&_
At. FileName & "(" & at. Size & "bytes)" & "</a>" & separator
Next
End Function
'The above is the attachment for the program.,And save it to the server.,You can also return the attachment link..
%>
<Html>
<Body>
<TABLE>
<Tr>
<Td>Topic:Hi!! </Td>
<Td> <% = msg. Subject %> </td>
</Tr>
<Tr>
<Td>Sender:Li yingbing@ 163.net</td>
<Td> <% = msg. FromName %> </td>
</Tr>
<Tr>
<Td>Recipient:Song yanhao@ 163.net</td>
<Td> <% = ReTO %> </td>
</Tr>
<Tr>
<Td>CC:Shen Chaoyang@ 163.net</td>
<Td> <% = ReCC %> </td>
</Tr>
<Tr>
<Td>Attachment:Legend of dancing with the wind</Td>
<Td> <% = getAttachments %> </td>
</Tr>
<Tr>
<Td>Content:Uri wow, Uri wow ......</Td>
<Td> <pre> <% = msg. body %> </pre> </td>
</Tr>
</TABLE>
</Body>
<% End if
Pop3.Disconnect
%>
[1]