[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Send an email
[Thread Prev] | [Thread Next]
- Subject: Re: Send an email
- From: System64 Development <64xcode@xxxxxxxxx>
- Date: Fri, 25 Oct 2024 11:21:05 +0200
- To: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
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
| Re: Send an email | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
| Send an email | System64 Development <64xcode@xxxxxxxxx> |
| Re: Send an email | System64 Development <64xcode@xxxxxxxxx> |