<% Set pop3 = Server. CreateObject ("JMail. POP3 ")
Pop3.Connect "username", "password", "pop3mail.intels.net"
'Pop3 connection username, password, POP3 address.
Response. Write ("You have" & pop3.count & "emails. <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
'The above gets all recipients and stores them.
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 obtained by the program and saved to the server. You can also return the attachment link.
%>
<Html>
<Body>
<TABLE>
<Tr>
<Td> theme: Greetings to you! </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, Uri, and so on ...... </Td>
<Td> <pre> <% = msg. body %> </pre> </td>
</Tr>
</TABLE>
</Body>
<% End if
Pop3.Disconnect
%>
[1]