View email message

Post

Posted
Rating:
#1 (In Topic #418)
Regular
bill-lancaster is in the usergroup ‘Regular’
 I have a folder of mail message files downloaded from a mail server.
Is there a way of viewing these messages within a gambas project?
Online now: No Back to the top

Post

Posted
Rating:
#2
Regular
bill-lancaster is in the usergroup ‘Regular’
I should say that MailClient.Message.Body[0].ToString() does work but doesn't seem to deal with html messages, it show the raw html.
I don't know if Mime.Decode would do the job because I'm struggling with it.
Also MimeMessage is a possibility but haven't figured that one out.
If there's a simpler way to display any message then I'd like to know about it!
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
vuott is in the usergroup ‘Regular’

bill-lancaster said

Also MimeMessage is a possibility but haven't figured that one out.
Maybe about using "MimeMessage" you could take a look at this wiki page of Italian Gambas Forum:

   Leggere la posta elettronica mediante le sole risorse di Gambas - Gambas-it.org - Wikipedia

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Expert
Quincunxian is in the usergroup ‘Expert’
 If the html messages are in raw html - you could pass them to a qt4 webview control then extract the text from that.

webview.url = html-mail-message
text-to-save = webview.text

Cheers - Quin.
I code therefore I am
Online now: No Back to the top

Post

Posted
Rating:
#5
Regular
bill-lancaster is in the usergroup ‘Regular’
 Thanks vuott, the link was usefull in showing how mimemessage works but (so far) does not display messages properly.  The example works fine with multipart/mixed type messages but not for other types.
Online now: No Back to the top

Post

Posted
Rating:
#6
Regular
bill-lancaster is in the usergroup ‘Regular’
 Thanks quin, that's a good idea
Online now: No Back to the top
1 guest and 0 members have just viewed this.