[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Send an email


ok, with this code I can read the emails.

But how to iterate all the emails in the inbox?

How to get the sender? it appear as null value.


Public Sub testMail(sType As String)

  Dim id As Integer
  Dim $Pop3ClientMessage As _Pop3Client_Message

  Dim msg As New MimeMessage
  Dim i As String
  Dim iSize As Integer
  Dim uid As Integer

  $Pop.Debug = True
  $Pop.port = 995
  $Pop.Encrypt = Net.SSL
  $Pop.Host = "pop.gmail.com"
  $Pop.User = $User
  $Pop.Password = $Pswd

  Try $Pop.Open
  If $Pop.Status = Net.Connected Then
    Print Subst(("You have &1 messages"), $Pop.Count)

    If $Pop.Count > 0 Then
      For Each i In $Pop.ListUniqueID()

        $Pop3ClientMessage = $Pop[0]
        msg = $Pop3ClientMessage.Message

        Print "Message from:" & msg.Sender ' Empty
        Print "Subject:" & msg.Subject
        Print "Body:" & msg.Body ' ???

      Next
    Endif

    Try $Pop.Close
  Endif

  If Error Then Print Error.Text

End Sub



Follow-Ups:
Re: Send an emailClaus Dietrich <claus.dietrich@xxxxxxxxxx>
References:
Send an emailSystem64 Development <64xcode@xxxxxxxxx>
Re: Send an emailSystem64 Development <64xcode@xxxxxxxxx>