Is it possible in NAV 5.0 to send an email with picture but not as an attachment but in the body of an email. I used CU SMTP Mail for sending emails and it works properly but didn't find that kind of possibility.
I've never tried to do this from Nav but an email with an embedded image is nothing more than an html file with the image mime encoded and a marker in the body of the message which says display attachment xxx here.
Its a bit labourious but constructing the html is not difficult. The html you construct is simply the body of the message.
Create an email in outlook and examine the structure and you can see what you are aiming for.
Alternately, if you are using an exchange server you have the CDO api which allows you to do this. Mapi may do as well but its not so flexible.
Codeunit 400 (SMTP) does have functionality to build up the body (AppendBody function) of the email and attach files (AddAttachment function). These 2 functions coupled with the HTMLBody flag at the end of the CreateMessage function are what I would play with to try and send out a picture in an email. You will to construct all the HTML in text (or maybe read it from a file/template) and then just refer to the attachment.
This should make it a little cleaner and you don't have to worry about mucking about with automation variables.
Answers
Its a bit labourious but constructing the html is not difficult. The html you construct is simply the body of the message.
Create an email in outlook and examine the structure and you can see what you are aiming for.
Alternately, if you are using an exchange server you have the CDO api which allows you to do this. Mapi may do as well but its not so flexible.
Ian
This should make it a little cleaner and you don't have to worry about mucking about with automation variables.
Epimatic Corp.
http://www.epimatic.com