看看你给我的Springsoft.Network.dll的出错信息,提示找不到Microsoft.VisualBasic,是不是你少给了我一个文件啊?我试着使用framework\v1.0.3705\中的Microsoft.VisualBasic.dll,提示版本不匹配。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ “DefaultDomain”:已加载“c:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll”,未加载符号。 “wa”:已加载“C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\bin\wa.exe”,符号已加载。 “wa.exe”:已加载“c:\winnt\assembly\gac\system.windows.forms\1.0.3300.0__b77a5c561934e089\system.windows.forms.dll”,未加载符号。 “wa.exe”:已加载“c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll”,未加载符号。 “wa.exe”:已加载“c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll”,未加载符号。 “wa.exe”:已加载“c:\winnt\assembly\gac\accessibility\1.0.3300.0__b03f5f7f11d50a3a\accessibility.dll”,未加载符号。 “wa.exe”:已加载“c:\documents and settings\administrator\my documents\visual studio projects\remotingstudy\wa\bin\springsoft.network.dll”,未加载符号。 未处理的“System.IO.FileNotFoundException”类型的异常出现在 wa.exe 中其他信息:找不到文件或程序集名称“Microsoft.VisualBasic”,或找不到它的一个依赖项。“wa.exe”:已加载“c:\winnt\assembly\gac\microsoft.visualbasic\7.0.3300.0__b03f5f7f11d50a3a\microsoft.visualbasic.dll”,未加载符号。未处理的异常: “wa.exe”:已加载“c:\winnt\assembly\gac\mscorlib.resources\1.0.3300.0_zh-chs_b77a5c561934e089\mscorlib.resources.dll”,未加载符号。 System.IO.FileNotFoundException: 找不到文件或程序集名称“Microsoft.VisualBasic”,或找不到它的一个依赖项。 文件名:“Microsoft.VisualBasic” at Springsoft.Network.POP3.Client..ctor(String server, Int32 port, Boolean Online, Int32 timeout) at wa.Form1.Form1_Load(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\Form1.vb:line 64 at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.SafeNativeMethods.ShowWindow(IntPtr hWnd, Int32 nCmdShow) at System.Windows.Forms.Control.SetVisibleCore(Boolean value) at System.Windows.Forms.Form.SetVisibleCore(Boolean value) at System.Windows.Forms.Control.set_Visible(Boolean value) at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at wa.Form1.Main() in C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\Form1.vb:line 4Fusion log follows: === Pre-bind state information === LOG: DisplayName = Microsoft.VisualBasic, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\bin\ LOG: Initial PrivatePath = NULL Calling assembly : Springsoft.Network, Version=1.0.1413.32405, Culture=neutral, PublicKeyToken=null. ===LOG: Publisher policy file is not found. LOG: Host configuration file not found. LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v1.0.3705\config\machine.config. LOG: Post-policy reference: Microsoft.VisualBasic, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic.DLL. LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic/Microsoft.VisualBasic.DLL. LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic.EXE. LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic/Microsoft.VisualBasic.EXE.程序“[2696] wa.exe”已退出,返回值为 0 (0x0)。
谢谢
[email protected]
[email protected]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
“DefaultDomain”:已加载“c:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll”,未加载符号。
“wa”:已加载“C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\bin\wa.exe”,符号已加载。
“wa.exe”:已加载“c:\winnt\assembly\gac\system.windows.forms\1.0.3300.0__b77a5c561934e089\system.windows.forms.dll”,未加载符号。
“wa.exe”:已加载“c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll”,未加载符号。
“wa.exe”:已加载“c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll”,未加载符号。
“wa.exe”:已加载“c:\winnt\assembly\gac\accessibility\1.0.3300.0__b03f5f7f11d50a3a\accessibility.dll”,未加载符号。
“wa.exe”:已加载“c:\documents and settings\administrator\my documents\visual studio projects\remotingstudy\wa\bin\springsoft.network.dll”,未加载符号。
未处理的“System.IO.FileNotFoundException”类型的异常出现在 wa.exe 中其他信息:找不到文件或程序集名称“Microsoft.VisualBasic”,或找不到它的一个依赖项。“wa.exe”:已加载“c:\winnt\assembly\gac\microsoft.visualbasic\7.0.3300.0__b03f5f7f11d50a3a\microsoft.visualbasic.dll”,未加载符号。未处理的异常: “wa.exe”:已加载“c:\winnt\assembly\gac\mscorlib.resources\1.0.3300.0_zh-chs_b77a5c561934e089\mscorlib.resources.dll”,未加载符号。
System.IO.FileNotFoundException: 找不到文件或程序集名称“Microsoft.VisualBasic”,或找不到它的一个依赖项。
文件名:“Microsoft.VisualBasic”
at Springsoft.Network.POP3.Client..ctor(String server, Int32 port, Boolean Online, Int32 timeout)
at wa.Form1.Form1_Load(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\Form1.vb:line 64
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(IntPtr hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at wa.Form1.Main() in C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\Form1.vb:line 4Fusion log follows:
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualBasic, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\remotingStudy\wa\bin\
LOG: Initial PrivatePath = NULL
Calling assembly : Springsoft.Network, Version=1.0.1413.32405, Culture=neutral, PublicKeyToken=null.
===LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v1.0.3705\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualBasic, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic/Microsoft.VisualBasic.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic.EXE.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Projects/remotingStudy/wa/bin/Microsoft.VisualBasic/Microsoft.VisualBasic.EXE.程序“[2696] wa.exe”已退出,返回值为 0 (0x0)。
[email protected]
这个组件只能运行在.Net 1.1版本下面。
强烈支持
学习一下
[email protected]
能不能问一下邮件里的图片等文件怎么一起发出去啊?就是做为附件的话,在网页里的路径是什么?
给我来一份
[email protected]
谢谢.可以给源代码吗?谢谢了
我也想要一份,能给的话太谢谢了!
Dim pop3 As New Springsoft.Network.Pop3.Client(Me.TextBox1.Text, 110, True, 30000) '指定邮件本地存储路径。
pop3.Inbox = Me.TextBox4.Text '连接服务器,入口参数:邮箱用户名,密码。
pop3.Connect(Me.TextBox2.Text, Me.TextBox3.Text) '从服务器接收邮件,入口参数:在服务器保存邮件副本,在本地保存邮件副本,接受后立即处理邮件。
pop3.Receive(Not Me.CheckBox1.Checked, True) '断开和服务器的连接。
pop3.Quit()
'这是一个向服务器发送邮件的例子 '创建一个SMTP客户端实例,入口参数:Springsoft.Network.TCPClient(服务器地址,端口,用户名,密码)。
Dim smtp As New Springsoft.Network.SMTP.Client(New Springsoft.Network.Servers.Server(Me.TextBox8.Text, 25, Me.TextBox7.Text, Me.TextBox9.Text)) '创建一个联系人数组。
Dim email(0) As Springsoft.Network.MIME.V1.Addressee '收件人昵称。
email(0).nickname = "test"
'收件人地址。
email(0).emailAddressee = "[email protected]" '指定邮件发件人。
smtp.From = email(0) '收件人昵称。
email(0).nickname = "test"
'收件人地址。
email(0).emailAddressee = "[email protected]" '指定邮件收件人。
smtp.To = email
'指定邮件抄送人。
smtp.Cc = email
'指定邮件暗抄收件人。
smtp.Bcc = email '邮件主体内容。
smtp.Body = "test"
'超文本格式邮件内容。
smtp.BodyHtml = "<html>test</html>" '创建一个邮件附件对象。
Dim a As Springsoft.Network.MIME.V1.Attachment '使用SMTP的邮件附件加载方法,将附件实例化。
a = smtp.LoadAttachment("c:\temp\test.wmv") '将附件添加到邮件中。
smtp.Attachments.Add(a) '连接服务器
If smtp.Connect Then '发送邮件
smtp.Send()
'与服务器断开连接
smtp.Quit() End If
'这是一个FTP客户端下在文件和上传文件的例子 '创建一个FTP客户端实例,:Springsoft.Network.TCPClient(服务器地址,端口,用户名,密码)。 Dim ftp As New Springsoft.Network.FTP.Client(New Springsoft.Network.Servers.Server(Me.TextBox12.Text, CInt(Me.TextBox14.Text), Me.TextBox11.Text, Me.TextBox13.Text, 100000))
Dim f As IO.File, int As Integer, int1 As Integer If ftp.Connect Then System.Threading.Thread.CurrentThread.Sleep(1000)
'获取用户的根目录。
ftp.Command_PWD()
System.Threading.Thread.CurrentThread.Sleep(1000)
'使用字符命令
ftp.Command_TYPE(Springsoft.Network.FTP.Client.TYPE.ASCII)
System.Threading.Thread.CurrentThread.Sleep(1000)
'ftp.Command_Port()
'打开数据传输连接。
ftp.Command_PASV()
System.Threading.Thread.CurrentThread.Sleep(1000) '获取目录列表。
Dim dl() As Springsoft.Network.FTP.Client.DirectoryList = ftp.Command_List("-la")
Dim dl1 As Springsoft.Network.FTP.Client.DirectoryList For Each dl1 In dl '获取目录中的文件。 If dl1.Type = Springsoft.Network.FTP.Client.FileType.File Then '保存文件。
ftp.Command_RETR(ftp.CurrentDirectory & dl1.Name, 0, dl1.Size, "c:\temp\ftp\" & dl1.Name) End If Next '创建一个目录
ftp.Command_MKD("jsyy")
'改变当前目录。
ftp.Command_CWD("jsyy") '向当前目录上传文件,返回文件上传的字节数。。
ftp.Command_STOR("c:\temp\file\test.wmv", "test1.wmv")
'改变当前目录指定的文件的文件名。
ftp.Command_RENAME(ftp.CurrentDirectory & "test1.wmv", "test3.wmv")
'向指定的文件追加内容。
ftp.Command_APPE("c:\temp\file\test.wmv", 0, "test3.wmv")
'删除指定的文件。
ftp.Command_DELE("test3.wmv")
'返回上级目录。
ftp.Command_CDUP()
'删除指定的目录。
ftp.Command_RMD("jsyy") '和服务器端开连接。
ftp.Close()
非常需要
[email protected]
谢谢