httpGetAsync for msg display from Server


Just found this forum… had asked this question at: but haven’t figured it out yet.

I can’t seem to pass the “file path” to the reader script. It runs, no errors, but no msg displays either.
Thanks in advance for any help on this…

Just very quickly browsing and seeing NS_ERROR_UNKNOWN_PROTOCOL and q:\..., it might help to use the file:// protocol to reference your file instead. This is like http:// but is used to reference local files.

Thank you Senocular, I’ll give that a try. The thing is… I’m stuck on how to plug the .msg path into src-file below. This script works to pull up a .msg from the local machine using a Browse button. I basically need to eliminate the Browse button (easy) and plug a selected value into src-file. That’s where I’m stuck.

     $(function () {
if (isSupportedFileAPI()) {
    $('.src-file').change(function () {
        var selectedFile = this.files[0];
        if (!selectedFile) {
            $('.msg-info, .incorrect-type').hide();
        if ('.msg') == -1) {
        $('.msg-example .msg-file-name').html(;

        // read file...
        var fileReader = new FileReader();
        fileReader.onload = function (evt) {

            var buffer =;
            var msgReader = new MSGReader(buffer);
            var fileData = msgReader.getFileData();

            if (!fileData.error) {
                $('.msg-example .msg-from').html(formatEmail({name: fileData.senderName, email: fileData.senderEmail}));
                $('.msg-example .msg-to').html(, function (recipient, i) {
                    return formatEmail(recipient);
                $('.msg-example .msg-subject').html(fileData.subject);
                $('.msg-example .msg-body').html(fileData.body ? fileData.body.substring(0, Math.min(500, fileData.body.length)) + (fileData.body.length > 500 ? '...' : '') : '');
                $('.msg-example .msg-attachment').html(, function (attachment, i) {
                    return attachment.fileName + ' [' + attachment.contentLength + 'bytes]' + (attachment.pidContentId ? '; ID = ' + attachment.pidContentId : '');
                // Use msgReader.getAttachment to access attachment content ...
                // msgReader.getAttachment(0) or msgReader.getAttachment(fileData.attachments[0])
            } else {
} else {


I was too hasty with the reply!