[求助] vb制作收发邮件不能正常运行
无法找到主机“pop3”。请检查输入的服务器名是否正确。 帐户: 'pop3', 服务器: 'pop3', 协议: POP3, 端口: 110, 安全(SSL): 否, 套接字错误: 11001, 错误号: 0x800CCC0D求大虾,我刚学vb最近在用vb制作电子邮件的收发可是不能正常运行,虽然编译是通过了,可还是不能收发邮件啊,怎样才能使自己做的这个程序能够收发邮件,希望高手能指点一下,谢谢啊!我的代码是
Public Sub DisplayMessage()
'显示邮件数
lblCount.Caption = "第" & LTrim(Str(MAPIMessages1.MsgIndex)) & _
"封邮件,总计" & LTrim(Str(MAPIMessages1.MsgCount)) & "封邮件"
TxtDate.Text = MAPIMessages1.MsgDateReceived '显示邮件日期
txtsubject.Text = MAPIMessages1.MsgSubject '显示邮件主题
TxtSender.Text = MAPIMessages1.MsgOrigDisplayName '显示发件人
txtmessage.Text = MAPIMessages1.MsgNoteText '显示邮件主题
End Sub
Private Sub CmdClose_Click()
End
End Sub
Private Sub CmdMessage_Click()
Form2.Enabled = False
Form2.visiable = False
Form1.Enabled = True
Form1.Visible = True
End Sub
Private Sub CmdNext_Click()
If MAPIMessages1.MsgIndex < MAPIMessages1.MsgCount - 1 Then
MAPIMessages1.MsgIndex = MAPIMessages1.MsgIndex + 1
DisplayMessage
Else
Beep
End If
End Sub
Private Sub Cmdpre_Click()
If MAPIMessages1.MsgIndex > 0 Then
MAPIMessages1.MsgIndex = MAPIMessages1.MsgIndex - 1
DisplayMessage
Else
Beep
End If
End Sub
Private Sub Form_UnLoad(cancel As Integer)
MAPISession1.SignOff '释放邮件会话
End Sub
Private Sub Form_Load()
MAPISession1.SignOn
End Sub
Private Sub Form_UnLoad(cancel As Integer)
MAPISession1.SignOff
End Sub
Private Sub cmdSend_Click()
With MAPIMessages1
.MsgIndex = -1
.RecipDisplayName = txtsendto.Text
.MsgSubject = txtsubject.Text
.MsgNoteText = txtmessage.Text
.SessionID = MAPISession1.SessionID
.Send
End With
MsgBox "邮件发送完毕!", , "发送邮件"
End Sub