ctx.base64.encodeStream(ctx.fso.file.read(<fullPathFile>, e.file.encoding.Binary))
ctx.outlook.init();
ctx.outlook.mail.create( {
To:'youremail@sap.com', Subject:'Test email with image'
});
var body_text = '<!DOCTYPE html>';
body_text += '<html>';
body_text += ' <head>';
body_text += '<title>HTML img Tag</title>';
body_text += '</head>';
body_text += '<body>';
body_text += '<img src="data:image/png;base64,' + ctx.base64.encodeStream(ctx.fso.file.read("<fullPathImageFile>", e.file.encoding.Binary))+'">';
body_text += '</body>';
body_text += '</html>';
try {
ctx.outlook.mail.setBodyHtml(0, body_text);
var res = ctx.outlook.mail.send(0);
} catch (err) {
ctx.log("error : " + err);
}
ctx.outlook.end();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
40 | |
25 | |
17 | |
14 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 |