Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 02 OCT 2012 05:57:19PM john grant wrote:

I am merging a fax with MS Outlook, using MAPISend. Here is a code snipit that sends 2 PDF file attachments as well:

Logon to MAPI without prompt if MAPILogon (session, @window, user, password, MAPI_LOGON_UI$ + MAPI_NEW_SESSION$) then Send an e-mail, request a receipt

CRLF=\0D0A\

*Note = "Dr. ":REFMDVAR:",":CRLF:CRLF

Note ="Documents for scheduled surgery / admission"

flags = MAPI_RECEIPT_REQUESTED$ + MAPI_LOGON_UI$+MAPI_DIALOG$

message = ""

message<POS_SUBJECT$> = "Notice of Patient Admission"

message<POS_TO$> = EMAILVAR

message<POS_FROM$> = PRACTICEVAR

message<POS_TEXT$> = Note

message<POS_FLAGS$> = FLAGS

message<POS_TYPE$> = "IPM."

message<POS_FILES$> = FILESSENDVAR

message<POS_paths$> = PATHSENDVAR

message <POS_POSITIONS$> = "1":@vm:"2"

If MAPIsendMail(0, @window, flags, message) Then

Msg(@Window,"Message successfully sent")

End Else

End

The code loads Outlook along with the 2 attachments and will send all to my e-mail address. When I send to my fax.com telephone number, however, the attachments are dropped. I have querried fax.com and they say: "When reviewing some of the email-to-fax requests, we are receiving some of the files as winmail.dat files. This occurs when the sender uses Microsoft Outlook and the format of the message is Rich Text Format (RTF). The data in a winmail.dat file is not usable. To resolve this issue, you will need to re-send the message in plain text format."

I have set all settings in Outlook to standard text that I can find and if I send the same attachments from Outlook itself - all works well. What settings in OI might be sending RTF text that blocks the attachments?


At 04 OCT 2012 08:08PM Carl Pates wrote:

John,

Try changing the POS_TYPE$ field to "IPM.Note" or even leaving it blank. The OI MAPI functions are a wrapper around Simple MAPI which is a very limited way of sending email (and an API that MS are trying to drop), and offers limited control.

If you're using Outlook as the mail client you might be better off investigating it's OLE interface using the Outlook object model as documented on the MS site.

Carl Pates

Sprezzatura

The Sprezzatura Blog

World leaders in all things RevSoft

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/7a97f6004906390909a1bcefd.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1