I trying to use mailparser to extract a text file from an email attachment.
When the email is sent by SMTP the attachment is not save.
Attachments=(ArrayList) [], indicating no attachment.
However, when I send an email via Gmail or Outlook directly all is OK.
The email body is empty. I only want to read the attachement text file.
I've read about this problem before but couldn't find any solution for it
I read the same problem from MFfromGermany, Dec 9, 2015 thread, but i don´t know the name of the attachements file when I mailparser the email.
My code from POP_DownloadCompleted
Sub POP_DownloadCompleted (Success As Boolean, MessageId As Int, MessageText As String)
If Success = False Then
Log(LastException.Message)
Else
Log(MessageId)
'Parse the mail
Dim m As Message
m = MailParser.ParseMail(MessageText, File.DirRootExternal)
Log("ATACHEMENTS = " & m.Attachments)
Log("TITUL = "& m.Subject)
Dim t As String
t=File.ReadString(File.DirRootExternal, m.Attachments.Get(0))
Log("FILE T = " & t)
End If
End Sub
Best Regards
Antonio Ferreira
When the email is sent by SMTP the attachment is not save.
Attachments=(ArrayList) [], indicating no attachment.
However, when I send an email via Gmail or Outlook directly all is OK.
The email body is empty. I only want to read the attachement text file.
I've read about this problem before but couldn't find any solution for it
I read the same problem from MFfromGermany, Dec 9, 2015 thread, but i don´t know the name of the attachements file when I mailparser the email.
My code from POP_DownloadCompleted
Sub POP_DownloadCompleted (Success As Boolean, MessageId As Int, MessageText As String)
If Success = False Then
Log(LastException.Message)
Else
Log(MessageId)
'Parse the mail
Dim m As Message
m = MailParser.ParseMail(MessageText, File.DirRootExternal)
Log("ATACHEMENTS = " & m.Attachments)
Log("TITUL = "& m.Subject)
Dim t As String
t=File.ReadString(File.DirRootExternal, m.Attachments.Get(0))
Log("FILE T = " & t)
End If
End Sub
Best Regards
Antonio Ferreira