berthier
28th August 2013, 17:33
I need to prepare an email for my customer with a body text, attached documents, and the recipient address filled.
The customer wants to have Outlook open automatically with the body text, and attached documents and then after his validation he just have to click on the send button.

I have almost the solution when I am using the SMTP service, (ttcmf0130m000) but the e-mail is sent directly to the recipient, Outlook is not opened.
the function display message cmf.setdisplay(message.ID, ttyeno.yes) is not working when I am using SMTP service.

When I am using the OUTLOOK service, Outlook is opened for the prepared message. I am using the parameter cmf.ShowMessage = 1 in the cmf.sendtoperson function
but the attached documents are renamed att1.txt att2.jpg. File extension are ok but the file name is changed. I am using MIME types text/plain and image/jpeg.

Does anyone have done this before and could have a solution to this problem.
Is there another way to prepare an email as a draft with recipient address, body, and attached documents filled ?

NPRao
29th August 2013, 00:44
I have almost the solution when I am using the SMTP service, (ttcmf0130m000) but the e-mail is sent directly to the recipient, Outlook is not opened.
the function display message cmf.setdisplay(message.ID, ttyeno.yes) is not working when I am using SMTP service.
I think SMTP service is executed in the background without the UI mode. For UI mode, you have to use the Outlook service.
Without seeing your code, its hard to guess. One easy work-around is to email the sender, he can review it and then send it out to the recipient.

When I am using the OUTLOOK service, Outlook is opened for the prepared message. I am using the parameter cmf.ShowMessage = 1 in the cmf.sendtoperson function
but the attached documents are renamed att1.txt att2.jpg. File extension are ok but the file name is changed. I am using MIME types text/plain and image/jpeg.
You can use - cmf.setAttachmentFilename() (http://www.baanboard.com/programmers_manual_baanerp_help_emessage_connector_cmf_setattachmentfilename)

berthier
29th August 2013, 12:05
I think SMTP service is executed in the background without the UI mode. For UI mode, you have to use the Outlook service.
Without seeing your code, its hard to guess. One easy work-around is to email the sender, he can review it and then send it out to the recipient.

Thank you for your response
Cf code in attachement.



You can use - cmf.setAttachmentFilename()

This function is not working when I am using OUTLOOK service. The attachement file is always renamed att1.txt, att2.jpg.
It works when I am using SMTP service.

NPRao
30th August 2013, 01:37
Check the Services (ttcmf0130m000) session for the file type.

We use SMTP with Plain Text Unicode, sending it back to the user would be a easy alternative.