Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Receiving Attachements with Delphi?

Status
Not open for further replies.

wheatus

Programmer
Feb 25, 2002
1
DE
Hi,
i got a little problem with nmpop3.
i have a pop3 account and i want download the attachment from my email. and just the attachment.
but if i type in:
NMPOP31.GetMailMessage(1);
i get the attachment AND temp1.mme.
the temp1.mme is bigger than the attachment and that sucks.

does anyone know how i get JUST the attachment from an email

hopefully
wheatus
 
Wheatus,

The attachment is UU-Encoded or Mime-Encoded inside the message and then transferred to your local PC. These are both formats that allow hacking off the 8th bit from a byte, without loosing any information. This also implies that any file sent by e-mail gets a 'fat' skin of 12% added, just to transfer. This ...-encoded stuff is decoded to the original attachment by the nmpop3 component, so that's why you got both files. Btw, set the AttachFilePath property to some meaningfull place, like the \attach\ dir under your app dir, and the file will be all you 'see', as the mme *should* be removed automatically, with the exit of your app. If it doesn't, blame it on the buggy FastNet components, they are known to have a lot of nasty bugs! A good, and free alternative, but different in use and implementation, is Indy, with version 8 included with Delphi 6, and version 9 comming, on their (indy)website (that's the old name, and probably website, but it will get you there)

HTH,
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top