Information générale
Catégorie:
Produits tierce partie
Thanks for the previous help with this product. I've actually moved pretty far along with it now, but I'm stuck on how it sees the body of a message when there is an attachment. My app can get the mail, save the attachments to disk and tell the user all that. I can display the messages, but if there is an attachment I can't seem to get the body to show up. The book says that if there is an attachment there is no BODY(0), Instead, you have multiple parts, one of which is the attachment and one or more is the body. In my test, I have a message with 2 parts (checked in the debugger). The app steps through the following code and crashes when it tries to look at part 2. Any ideas?
this code is on a button that displays a message on the screen.
it crashes on the 2nd time through even thought mmail.parts=2
originally it was mmail.parts-1, but the code never ran through
the loop a second time for the second part.
IF thisform.MMail.Parts > 1
FOR nPrt = 1 TO thisform.MMail.Parts
thisform.MMail.Part=nPrt
thisform.mmail.Descend
if thisform.mmail.contentdisposition > " "
nBEG=AT('"',thisform.MMail.ContentDisposition)+1
nEND=AT('"',thisform.MMail.ContentDisposition,2)
whereisit='c:\temp\'+;
SUBSTR(thisform.MMail.ContentDisposition,nBEG,nEND-nBEG)
thisform.lblStatus.Caption = "Attached file saved to "+whereisit
else
thisform.txtbody.value = thisform.mMail.body(0)
endif
thisform.mmail.Ascend
endfor
else
thisform.txtbody.value = thisform.mMail.body(0)
endif
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement