i cannot use any pop3 component.
i should write code for it in VB.net
could some one help me by tellin how i could do this..
Could some one tell me the links where i could find codes to read mails in gmail acc using pop3 in VB.net?
Dim mailman As New Chilkat.MailMan()
' Any string argument automatically begins the 30-day trial.
Dim success As Boolean
success = mailman.UnlockComponent("30-day trial")
If (success %26lt;%26gt; true) Then
MsgBox("Component unlock failed")
Exit Sub
End If
' Set the GMail account POP3 properties.
mailman.MailHost = "pop.gmail.com"
mailman.PopUsername = "****"
mailman.PopPassword = "****"
mailman.PopSsl = true
mailman.MailPort = 995
Dim bundle As Chilkat.EmailBundle
' Read mail headers and one line of the body.
' To get the full emails, call CopyMail instead (no arguments)
bundle = mailman.GetAllHeaders(1)
If (bundle Is Nothing ) Then
MsgBox(mailman.LastErrorText)
Exit Sub
End If
Dim i As Integer
Dim email As Chilkat.Email
For i = 0 To bundle.MessageCount - 1
email = bundle.GetEmail(i)
' Display the From email address and the subject.
TextBox1.Text = TextBox1.Text %26amp; email.From %26amp; vbCrLf
TextBox1.Refresh()
TextBox1.Text = TextBox1.Text %26amp; email.Subject _
%26amp; vbCrLf %26amp; vbCrLf
TextBox1.Refresh()
Next
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment