日期:2014-05-18  浏览次数:20429 次

知道邮箱的账号密码!可不可以通过程序得到该邮箱信息?
以qq邮箱为例好了!前提:知道用户名密码;能不能获取该邮箱的未读邮件等等?asp.net实现!

------解决方案--------------------

探讨

引用:

引用:

引用:

真心能。前提 qq邮箱开了收件服务。

求例子!!

很多的,各种搜啊。

各种搜不到!

------解决方案--------------------
Jmail插件的专业版(收费版本),需要在服务器安装才能调用

具体的写法你可以在网上搜索“Jamil收邮件”,很多这样的代码
------解决方案--------------------
探讨

引用:

Jmail插件的专业版(收费版本),需要在服务器安装才能调用

具体的写法你可以在网上搜索“Jamil收邮件”,很多这样的代码

收费就算了!同样感谢

------解决方案--------------------
VB.NET code

Imports System.IO
Imports System.Net
Imports System.Net.Sockets

Public Class Form1

    Private Function Connect(ByVal strServer As String, ByVal strUser As String, ByVal strPwd As String) As NetworkStream
        Dim Sender As New TcpClient(strServer, 110)
        Dim OutBytes As Byte()
        Dim input As String
        Dim Ns As NetworkStream = Nothing

        Try
            Ns = Sender.GetStream()
            Dim sr As New StreamReader(Ns, System.Text.Encoding.GetEncoding("gb2312"))
            input = "user " & strUser & vbCrLf
            OutBytes = System.Text.Encoding.ASCII.GetBytes(input)
            Ns.Write(OutBytes, 0, OutBytes.Length)
            Console.WriteLine(sr.ReadLine())
            input = "pass " & strPwd & vbCrLf
            OutBytes = System.Text.Encoding.ASCII.GetBytes(input)
            Ns.Write(OutBytes, 0, OutBytes.Length)
            Console.WriteLine(sr.ReadLine())
            Console.WriteLine("==========================================================")
            Return Ns
        Catch ex As Exception
            MsgBox("无法连接到服务器", MsgBoxStyle.Critical)
            Return Ns
        End Try
    End Function

    Private Function GetNumberOfNewMessages() As Integer
        Dim OutBytes As Byte()
        Dim input As String
        Dim strTemp As String

        GetNumberOfNewMessages = -1
        Try
            Dim Ns As NetworkStream = Connect("pop3.163.com", "username", "password") '这里输入你自己的用户名和密码
            If (Ns Is Nothing) Then Exit Function
            Dim sr As New StreamReader(Ns, System.Text.Encoding.GetEncoding("gb2312"))

            input = "stat" & vbCrLf
            OutBytes = System.Text.Encoding.ASCII.GetBytes(input)
            Ns.Write(OutBytes, 0, OutBytes.Length)
            Dim resp As String = sr.ReadLine()
            Console.WriteLine(resp)
            MsgBox(resp)
            Dim tokens As String() = resp.Split(" ")


            input = "UIDL 3" & vbCrLf
            OutBytes = System.Text.Encoding.ASCII.GetBytes(input)
            Ns.Write(OutBytes, 0, OutBytes.Length)
            resp = sr.ReadLine
            Console.WriteLine(resp)
            MsgBox("Uidl:" & resp)

            input = "RETR 3" & vbCrLf
            OutBytes = System.Text.Encoding.ASCII.GetBytes(input)
            RichTextBox1.Text = "请稍候.."
            RichTextBox1.Refresh()

            Dim wenzhou As String = ""
            Do
                Ns.Write(OutBytes, 0, OutBytes.Length)
                Console.WriteLine(resp)
                resp = sr.ReadLine
                wenzhou &= resp & vbCrLf
            Loop While resp <> "."
            RichTextBox1.Text = wenzhou

            input = "quit" & vbCrLf
            OutBytes = System.Text.Encoding.ASCII.GetBytes(input)
            Ns.Write(OutBytes, 0, OutBytes.Length)
            Console.WriteLine(sr.ReadLine())
            sr.Close()
            Ns.Close()

            Return Val(tokens(1))
        Catch ex As