eric.dizon
15th November 2012, 21:40
I was able to create a custom session that sends out an email notification for Sales Orders in our system.

I've used the Emessage connector via SMTP service. I've used the cmf functions to create the message and send it.

The next step is for me to make the Email Body Text to use HTML format/conventions to polish the Email's content. I create a text file to set it as the attachment body. Is there a example that I can look at or am I just missing a command/setting to achieve an HTML Email Body format. Please advise.

|Set attachment
attachment.ID = cmf.createAttachment(message.ID)
ret = cmf.setAttachmentBody(attachment.ID, ttyeno.yes)

|ret = cmf.setAttachmentMIME(attachment.ID,"application/rtf")
ret = cmf.setAttachmentFileName(attachment.ID, sourcefile ,sourcefile)


Regards,

Eric

JaapJD
19th November 2012, 09:13
You should use "text/html" as MIME type:


ret = cmf.setAttachmentMIME(attachment.ID,"text/html")

eric.dizon
19th June 2013, 17:21
Thanks Jaap this worked for what I need it to be...

berthier
10th July 2013, 17:17
I would like to do the same thing, like eric, (sending an e-mail with Html format). My html file contains a company logo, but when I receive the message Outlook is unable to display the .jpg logo : there is red cross instead.
Should I add the logo in the attachement before sending ? and what shoud I write for this ?
ret = cmf.setAttachmentMIME(attachment.ID,"text/html")
ret = cmf.setAttachmentFileName(attachment.ID, company.logo, company.logo)

NPRao
28th August 2013, 23:30
Should I add the logo in the attachement before sending ? and what shoud I write for this ?
ret = cmf.setAttachmentMIME(attachment.ID,"text/html")
ret = cmf.setAttachmentFileName(attachment.ID, company.logo, company.logo)
Try the image tag - http://en.wikipedia.org/wiki/Internet_media_type

NPRao
28th August 2013, 23:31
Should I add the logo in the attachement before sending ? and what shoud I write for this ?
ret = cmf.setAttachmentMIME(attachment.ID,"text/html")
ret = cmf.setAttachmentFileName(attachment.ID, company.logo, company.logo)
Try the image tag for the MIME - http://en.wikipedia.org/wiki/Internet_media_type