Power Builder - PB y Outlook

   
Vista:

PB y Outlook

Publicado por antonio (1130 intervenciones) el 05/06/2017 05:03:21
Un saludo a todos:

¿Alguien sabe como leer los correos del Outlook y bajar los archivos adjuntos?

necesito leer los correos que llegan al Outlook y luego los archivos adjuntos (PDF y XML) guardarlos en un directorio en específico.


Gracias,
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

PB y Outlook

Publicado por Leopoldo Taylhardat (708 intervenciones) el 07/06/2017 22:27:07
Saludos...

mailsession.mailReadMessage ( messageid, mailmessage, readoption, mark )
Argument Description
mailsession A mailSession object identifying the session in which you want to read a message
messageid A string whose value is the ID of the mail message you want to read
mailmessage A mailMessage structure in which mailReadMessage stores the message information
readoption A value of the mailReadOption enumerated data type:¨ mailEntireMessage! — Obtain header, text, and attachments¨ mailEnvelopeOnly! — Obtain header information only¨ mailBodyAsFile! — Obtain header, text, and attachments, and treat the message text as the first attachment, storing it in a temporary file¨ mailSuppressAttachments! — Obtain header and text, but no attachments
mark A boolean indicating whether you want to mark the message as read in the user's inbox. Values are:¨ TRUE — Mark the message as read¨ FALSE — Do not mark the message as read
Return value

MailReturnCode. Returns one of the following values:

mailReturnSuccess!
mailReturnFailure!
mailReturnInsufficientMemory!

If any argument's value is NULL, mailReadMessage returns NULL.

Usage

To obtain the message IDs for the messages in the user's inbox, call mailGetMessages.

Reading attachments If a message has an attachment and you don't suppress attachments, information about it is stored in the AttachmentFile property of the mailMessage object. The AttachmentFile property is a mailFileDescription object. Its PathName property has the location of the temporary file that mailReadMessage created for the attachment. By default, the temporary file is in the directory specified by the TEMP environment variable.

Be sure to delete this temporary file when you no longer need it.

Before calling mail functions, you must declare and create a mailSession object and call mailLogon to establish a mail session.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar