Quantcast
Channel: Aspose.Email Product Family
Viewing all 1367 articles
Browse latest View live

Error while converting .eml to msg.

$
0
0

Hello all,

 

i posted about this problem a view weeks ago and got no solution until now.

We try to convert a eml-forrmatted mail from stream into a msg-forrmatted mail and save it to an other stream with Aspose.Network.

 

The code below works fine when running on Microsoft Windows XP and it fails when running on Microsoft Windows Server 2003 R2,

standard x64 edition,build number 3790, service pack 2.

 

We use Aspose.Network for .NET 2.0 version 4.6.0.1 (evaluation version with evaluation license) and .net framework v2.0.50727.

 

We try to convert the email format in two different ways and in both cases the code below fails at the underlined line with a null pointer

exception while the input parameters were valid object references.

 

This error occurs when executing the code in context of a web application within IIS 6 as well as when executing it in a Windows Forms application.

 

Anyone can help me?

 

Best Regards

Volker Roeser

public static Stream ConvertMailFormat(Stream pStream, MessageFormat pInputFormat, MessageFormat pOutputFormat)
{
    Stream stream = null;

    try
    {
        pStream.Position = 0;
        MailMessage mailMessage = MailMessage.Load(pStream, pInputFormat);
        stream = new MemoryStream();

        if (pInputFormat.ToString().Equals("Eml")
          && pOutputFormat.ToString().Equals("Msg"))
        {
            MapiMessage mapiMessage = MapiMessage.FromMailMessage(mailMessage);
            mapiMessage.Save(stream);
        }
        else if (pInputFormat.ToString().Equals("Msg")
          && pOutputFormat.ToString().Equals("Eml"))
        {
            mailMessage.Save(stream, pOutputFormat);
        }

        stream.Position = 0;
    }
    catch (Exception)
    {
        throw
    }

    return stream;
}


public static Stream ConvertMailFormat(Stream pStream, MessageFormat pInputFormat, MessageFormat pOutputFormat)
{
    Stream stream = null;

    try
    {
        pStream.Position = 0;
        MailMessage mailMessage = MailMessage.Load(pStream, pInputFormat);

        stream = new MemoryStream();
        mailMessage.Save(stream, pOutputFormat);
        stream.Position = 0;
    }
    catch (Exception)
    {
        throw
    }

    return stream;
}

 

 

 

 

 

 

 


Differentiate between EML and MSG attachment

$
0
0
Is it possible to differentiate if an attachment email message is EML or MSG? 

Trimmed html body after convert eml to msg

$
0
0
Hi,

I would like to convert an eml-File to msg-File.
The mail file (see attachment test.zip -> test.eml) has a html body with a signature part at the end of the content.

At first time I used the evaluation licence and the following code:

var mailMessage = MailMessage.Load(@"C:\test.eml", new EmlLoadOptions());
mailMessage.Save(@"C:\test_evaluation_lic.msg", Aspose.Email.Mail.SaveOptions.DefaultMsgUnicode);

Second time I used a valid licence and the following code:

var lic = new Aspose.Email.License();
lic.SetLicense("Aspose.Email.lic");
var mailMessage = MailMessage.Load(@"C:\test.eml", new EmlLoadOptions()); mailMessage.Save(@"C:\test_valid_lic.msg", Aspose.Email.Mail.SaveOptions.DefaultMsgUnicode);

The code with evalution licence works without a problem (see attachment test.zip -> test_evalution_lic.msg).

The code with valid licence trimmed the html body and removes the signature part (see attachment test.zip -> test_valid_lic.msg).

Whats wrong?

corrupt msg file after converting from eml

$
0
0
Hello,

the following two sourcecode-lines create a corrupt msg file if in the eml-file is a Appointment:
The result msg-file can't open with Outlook 2010 (14.0...)
Message ist "Cannot read the item"

// ..
emlMessage = MailMessage.Load("filename.eml", new EmlLoadOptions());
emlMessage.Save("filename.msg",Aspose.Email.Mail.SaveOptions.DefaultMsgUnicode);
../

16.11.0.0 .net c#

If you need the eml-file please let me know.

Greetings,
Georg

Problem with setting attachment greater than 70 MB in PST File using Aspose.email for java

$
0
0
Hello Team, 

I have a problem with setting a attachment size up to 70 MB in PST File. It say out of heap.What is the maximum size to set attachment in PST File.Please help me 

Issue with Animated images in PST using aspose.email for java

$
0
0
Hello Team,

I have convert MBOX to PST. but in my MBOX contains some animated images. After creating PST animated images(GIF) not in PST file.They gets skipped from PST.

Please help me.

How to set and get Priority from mail using aspose.email for java

$
0
0
Hello Team,


I have a problem with setting and getting priority to mail. When i get priority from "MailMessage" then it gives me "Normal" priority every time.

This is my code ;-

f_Message = MailMessage.load(emlFile.getAbsolutePath());


MailPriority f_Priority = f_Message.getPriority();


I am reading mails from MBOX and convert it into PST File using your aspose.email for java jar file. 


Please help me!

How to get or set read/unread flag in mails using aspose.email for java

$
0
0
Hello Team,

    I have problem with getting read and unread flags from mails. I have tried using below code but did not getting properly.

boolean isread = (message.getFlags() & MapiMessageFlags.MSGFLAG_READ) == MapiMessageFlags.MSGFLAG_READ;




I have to create PST from MBOX file. while reading MBOX file unable to get read/unread mails flag


Please help me!


Issue with smiley faces not in PST File using aspose.email for java

$
0
0
Hello Team ,

  I have convert MBOX to PST. But in my MBOX contains some smiley faces. After converting MBOX to PST smiley faces is not there.
Please help me.

export gmail email body part into HTML file using java

$
0
0
Hi,

My requirement is to export the email body part (from gmail ) to HTML document using java.
Kindly provide help as its urgent.


Thanks in advance

Need assistance for retrieving recurrence meetings within a specific date range using java

$
0
0
Hello Sir/Madam,

We need to retrieve all recurrence meetings that have been created from outlook for a specific date range using Aspose client in java platform.

We used options that are provided in below link  http://www.aspose.com/docs/display/emailjava/Filter+Messages+from+Exchange+Mailbox

We used Mail query builder class and used internal date attribute of the class with since and before or equals option to pass date range (from and to dates) in order to get all recurrence meetings that lie within date range (from and to date).But we are still not able to get all recurrence meetings for the date range.
  • Can you please assist us in resolving above issue?
  • Can you please let us know specific time zone (EST/EDT/UTC) in which start and end date of  meetings that have been created from outlook, would be returned from Aspose client in java platform?
  • Can you please let us know significance/mapping of unique key in Aspose with respect to exchange server(outlook) and let us know if it corresponds to Ical Id or change key that is available in exchange server (outlook) 
thanks and regards,
Nalini



setDeliveryNotificationOptions in MailMessage

$
0
0
Dear,
I am encountering one question when using the com.aspose.email.MailMessage,
it has one method named 

setDeliveryNotificationOptions, 

if we would like to support the notification in both Success and Failure, how we could achieve this in java?

Content missing when .msg converted to .pdf

$
0
0
Hi,

When email has picture/image in it, then some part of image content is missing after an email has 
been converted to pdf.

I am using latest Aspose.Email.dll and Aspose.Words.dll .

Am attaching the sample .msg file and screenshot for the same. Please help.

Thanks,
Rajani

Check if the MAPI message already exists in the PST Folder

$
0
0
Dear kashif,

I'm getting the emails from office 365 and adding them to a pst file, so what i want to know how to check if the MAPI message already exists in the folder.

OST file process throws "The File appears to be corrupted".

$
0
0
Hi,

I am using Aspose.Email version 6.3.0.0 to process the OST files. While processing one of the OST file I am getting "The File appears to be corrupted" exception in "GetSubfolders()" function call. i have attached the code snippet for your reference.

But the OST is converted to PST without any issue.

Please guide me to resolve this issue.

Thanks,
Dhivya

Can you get a folderinfo from a mapimessage?

$
0
0
We have a list of entry IDs that have been extracted from a PST (by a means we do not control). Using the extractmessage we can retrieve the mapimessage object. Is there a way to get the message parent folderinfo so we can get the full path? Thank you

Image position not used

$
0
0
I'm trying to convert a word document to a msg file but I'm running into problems with images and abolute and relative positions.
As a test I've made a word document (which is included) which has some shapes (which will be handled as image) added in the document and a table just to see how the placement is done.
When saving it to a html document everything goes fine. I'm using the normal html save formate because fixedhtml seems to cause even more problems.
I use the following saveoptions (I use php and the php/javabridge):

$saveoptions = new Java("com.aspose.words.HtmlSaveOptions");
$headerfootermodes = new Java("com.aspose.words.ExportHeadersFootersMode");
$htmlelementsizeoutputmode = new Java("com.aspose.words.HtmlElementSizeOutputMode");
$saveoptions->setExportImagesAsBase64(true);
$saveoptions->setExportHeadersFooters(false);
$saveoptions->setExportHeadersFootersMode($headerfootermodes->NONE);
$saveoptions->setExportFontResources(false);
$saveoptions->setPrettyFormat(true);
$saveoptions->setTableWidthOutputMode($htmlelementsizeoutputmode->ALL);

Now when I try to load the document as a msg file from html it goes okay but for some reason the alignment of the images is changed compared to the generated html document. From what I can see the problem lies mostly in image which are aligned to the paragraph but I'm not 100% sure.

Inlcuded are the word document I used, the generated html document and the generated msg document.
Could you tell me what I'm doing wrong or how I can get the images to show up at the right place?

Is There a way to read and convert from a MBOX file to other file format like MSG?

$
0
0
Hello,

Is There a way to read and convert from a MBOX file to other file format like MSG?

regards!

Error loading EML file

$
0
0
Hi team,

I am getting error when loading eml file. Following is my code for loading. Please help as I want try this API.

MapiMessage mapiMessage = MapiMessage.fromFile("1.eml");

Thanks

Adding an attachment and inline image at the same time

$
0
0
Hi,

My requirement is to add an attachment to EML before sending. At the same time, I will like to add image in message body as inline attachment. Is it possible to achieve using Aspose.Email API at the same time?
Viewing all 1367 articles
Browse latest View live