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

Does Aspose Email Java API supports MS Office 365?

$
0
0
Hello,

We are going to take Aspose license for Email (Java). We will be using Aspose Java Email API for fetching out of office flag and automatic replies but before that we would like to confirm if this 
API supports Outlook 365 (Office 365 suite) or not? Please confirm.


Thanks

Sender Email Address : Issue while sending mail from outlook

$
0
0
Dear Team

We are using Aspose 4.8.0. In code we are getting the current user email address and setting it to 

MailMessage mailMsg = MailMessage
.load("C:/dev/Projects/EDM/New Template 08022017/NL to Connected Banker - Een ING kredietcontract klaar om te ondertekenen - Naam van de klant.msg");
MailAddress mailAddAdmin = new MailAddress("neeraj.singh.bhainsora@ing.be");
mailMsg.setFrom(mailAddAdmin);


The From is setting correctly but while sending it from Outlook its throwing error.

This message could not be sent. Try sending the message again later, or contact your network administrator. You do not have the permission to send the message on behalf of the specified user. Error is [0x80070005-0x0004dc-0x000524].

Error when saving MailMessage with SaveOptions.DefaultHtml -

$
0
0
While writing some unit tests for my code and I ran across an issue. I am not exactly sure if this is true bug or if I am doing something wrong.


[TestMethod()]
public void SaveMessageAsHtmlTestWithAsposeOnly()
{
var mailMessage = new Aspose.Email.Mail.MailMessage();
mailMessage.Date = DateTime.Now;
mailMessage.HtmlBody = "This is junk";
mailMessage.Attachments.Add(new Attachment("test.pdf"));
mailMessage.Save("SaveMessageAsHtmlTest.html",SaveOptions.DefaultHtml);
}

but if fails with this error.

System.InvalidCastException: Unable to cast object of type 'System.IO.FileStream' to type 'System.IO.MemoryStream'.

This same test passes if I save it as other types, am I doing something wrong. I would not expect to get an exception ?

How to change the "Sent:" date time format

$
0
0
I use the following code to convert the msg file to Tiff image and I want to change the format of the Sent date time from Sent:     Fri, 29 Apr 2016 08:34:14 -0500 to  Sent:  Fri 29-Apr-2016 8:34 AM

VB Code:
        Dim _msg As MailMessage = MailMessage.Load(FilNam_In, New MsgLoadOptions())
        Dim msgStream As MemoryStream = Nothing
        Try
            msgStream = New MemoryStream()
            _msg.Save(msgStream, Aspose.Email.Mail.SaveOptions.DefaultMhtml)
            'msgStream.Position = 0
            Dim msgDocument As Aspose.Words.Document = New Aspose.Words.Document(msgStream)
            For Each section As Aspose.Words.Section In msgDocument
                section.PageSetup.PaperSize = Aspose.Words.PaperSize.Letter
                section.PageSetup.BottomMargin = 20
                section.PageSetup.TopMargin = 20
                section.PageSetup.LeftMargin = 20
                section.PageSetup.RightMargin = 20
            Next section
            For Each table As Aspose.Words.Tables.Table In msgDocument.GetChildNodes(Aspose.Words.NodeType.Table, True)
                table.AllowAutoFit = True
                table.PreferredWidth = Aspose.Words.Tables.PreferredWidth.Auto
            Next table
            Dim _saveoptions As Aspose.Words.Saving.ImageSaveOptions = New Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Tiff)
            _saveoptions.ImageColorMode = Aspose.Words.Saving.ImageColorMode.None
            _saveoptions.PixelFormat = Aspose.Words.Saving.ImagePixelFormat.Format16BppRgb555
            _saveoptions.SaveFormat = Aspose.Words.SaveFormat.Tiff
            _saveoptions.TempFolder = Path.GetTempPath
            _saveoptions.TiffCompression = Aspose.Words.Saving.TiffCompression.Lzw
            _saveoptions.Resolution = 300.0
            _saveoptions.UseHighQualityRendering = True
            _saveoptions.ColorMode = Aspose.Words.Saving.ColorMode.Normal
            _saveoptions.DmlRenderingMode = Aspose.Words.Saving.DmlRenderingMode.DrawingML 'Aspose.Words.Saving.DmlRenderingMode.Fallback
            _saveoptions.DmlEffectsRenderingMode = Aspose.Words.Saving.DmlEffectsRenderingMode.Fine
            _saveoptions.PrettyFormat = False

            msgDocument.Save(FilNam_Out, _saveoptions) 'Aspose.Words.SaveFormat.Tiff)

Merge Feature

$
0
0
After testing the fix in EMAILNET-38563, it looks like the merge features has an issue.  After the merge Folders in Inbox folder are lost.

Below is the original ticket with the test data:

https://www.aspose.com/community/forums/thread/812955/counts-of-on-merge-feature.aspx


thanks

Aspose Crashes after memory leak on certain emails

$
0
0
Hi, we use Aspose Email and Aspose Word to convert emails to pdfs. We found certain emails cause a memory leak which locks the thread and eventually a freezes our application and allocates all the memory on the server.

Emails attached.

Aspose.Email.Mail.MailMessage mailMsg = Aspose.Email.Mail.MailMessage.Load(email, new Aspose.Email.Mail.MhtmlLoadOptions { PrefferedTextEncoding = Encoding.UTF8 });
using (var ms = new MemoryStream())            {                try                {                    var mailFormatter = new Aspose.Email.Mail.MhtMessageFormatter();                    const Aspose.Email.Mail.MhtFormatOptions mhtFormatOptions = Aspose.Email.Mail.MhtFormatOptions.HideExtraPrintHeader | Aspose.Email.Mail.MhtFormatOptions.WriteCompleteEmailAddress;                    mailFormatter.Format(mailMsg, mhtFormatOptions);                    mailMsg.Save(ms);                }                catch(SystemException ex)                {                    Logging.Error("Could not convert email", ex);                    throw ex;                }
//*********** It fails on this line *******************//
               Aspose.Words.Document document = new Aspose.Words.Document(ms, new Aspose.Words.LoadOptions {  LoadFormat = Aspose.Words.LoadFormat.Mhtml });
....

TNEF issue resulting in NDR from Exchange

$
0
0
Aspose.Email version: 16.12.0.

Environment: Exchange 2010 SP1 and MS Outlook 2010. Our Exchange transport agent performs some manipulations with messages (like changing attachment name etc.) using Aspose.Email.dll. PreserveTnef is used when saving processed message.

Scenario: User creates message in Outlook; adds 25 PDFs and sends internal message. 

Issue: Aspose.Email somehow changes message structure and Exchange cannot process message afterwards. User receives NDR.

NDR (message is attached):

#554-5.6.0 Corrupt message content 554 5.6.0 STOREDRV.Deliver.Exception:ConversionFailedException; Failed to process message due to a permanent exception with message Content conversion: Corrupt summary TNEF content. ConversionFailedException: Content conversion: Corrupt summary TNEF content. ##

There were no issue on Aspose.Email 6.6.0.0. 

Unfortunately, you need lab with Exchange transport agent in order to replicate the issue. Though you may already have it after testing the following issue  https://www.aspose.com/community/forums/thread/596250/ndr-from-exchange-server-with-content-conversion-error-for-message-with-outlook-item-from-drafts-fol.aspx





Also I found another issue that, I think, is a result of the same bug.

Scenario: I use EWSClient to send the same message, that resulted in an NDR in the environment with Exchange transport agent. This time NDR is not generated, but Exchange still considers TNEF part to be invalid, because Outlook shows "winmail.dat" attachment instead of a list of PDFs. If I use Aspose.Email 6.6.0.0 - no issue.

Attached sample project to demonstrate, that message comes with winmail.dat attachment.

Thanks,
Alex Shloma

The operation 'DATA' has timed out. Timeout '100000' has been reached.

$
0
0
Hi Support,

While sending email with attachment of size 12mb, i faced "The operation 'DATA' has timed out. Timeout '100000' has been reached." problem
I used latest version of Aspose.Email.dll, v16.12.0.0.

Please suggest me how to fix this problem. Please update me ASAP.

Thanks,
Munish

attachments not always found

$
0
0
Hi 
You have a post "Re: EML files with single attachment, attachment not recognized" from a couple of days ago; we are experiencing exactly the same problem.

We have .msg files with three attachments, and usually they are all found, but sometimes you are reporting that there are only two or less attachments. It's consistent - an msg file where the attachments are not all recognized will always behave the same way.

It has no relation to the order of the files in the msg.

We tried converting to eml and the problem did not change. 

Attached is an msg file with three attachments, but your product reports two.

Note - I renamed the extension of the attached file to .txt, as this forum would not allow posting .msg files

Thank you



Aspose 16.11.0.0 is very slow as compare to Apose 6.4.0.0

$
0
0
Hello Team,

I've been purchased & using Aspose.Email to create Pst file, as earlier i was using 6.4 version of aspose, but due to some issue of loading fail eml support member suggested to use latest version of aspose 16.11.0.0.

So i used latest version but i've noticed that in 6.4 version of aspose for conversion of 1lakh eml files to pst it use to take 35 hours but as compare to 16.11.0.0 it took 71 hours.

I've cross check these same by create two application one with 6.4 and one with 16.11.

The 16.11 one is very slow, can you please check this out as this is very critical for us.

Please correct me if i am wrong in any part.

Looking for positive response.

Thank You.

Regards,
Amit

Strange carachters in french mails

$
0
0
Hi

I'm facing a problem when i'm creating my msg and my html from an eml. (see attachments)

The problem is that i'f you open the EML, you will see that the charset is 
charset="Windows-1252"

The moment that I generate my MSG. My charset is still 
{\*\htmltag241 <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">}

And the moment that i generate the HTML still the charset is Windows-1252.

I think for the msg that's no problem because I can see the french characters.
But for the html you will see that the french carachters are strange.
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

Bellow you can see my code:


        public static void ConvertEmlToMsg(string emlFilePath, out string msgFilePath)
        {
            var mailMessage = MailMessage.Load(emlFilePath, new EmlLoadOptions());
            msgFilePath = FileUtility.GetTempFileName("msg");
            mailMessage.PreferredTextEncoding = Encoding.UTF8;
            mailMessage.Save(msgFilePath, Aspose.Email.Mail.SaveOptions.DefaultMsgUnicode);
        }

 public static string GetMailFile(string msgFilepath, out List<MailAttachment> attachments)
        {
            attachments = new List<MailAttachment>();
            string result;

            var tmpFileName = FileUtility.GetTempFileName("tmp");
            // Try saving as HTML
            try
            {
                var mailMessage = MailMessage.Load(msgFilepath, new MsgLoadOptions());
                mailMessage.TimeZoneOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
                mailMessage.BodyEncoding = Encoding.UTF8;
                mailMessage.PreferredTextEncoding = Encoding.UTF8;

                HtmlSaveOptions options = Aspose.Email.Mail.SaveOptions.DefaultHtml;
                mailMessage.IsBodyHtml = true;

                //save the message headers to output HTML using the formatting options
                options.HtmlFormatOptions = HtmlFormatOptions.WriteHeader | HtmlFormatOptions.WriteCompleteEmailAddress;
                options.MailMessageSaveType = MailMessageSaveType.HtmlFormat;
                options.CheckBodyContentEncoding = true;
                SetFormatHeaderDate(mailMessage);

                //First save the mail as a HTML
                mailMessage.Save(tmpFileName, options);
 }
            catch
            {
                if (File.Exists(tmpFileName))
                {
                    try { File.Delete(tmpFileName); }
                    catch { }
                }
                tmpFileName = null;
            }
}


Mails are not getting saved while exporting

$
0
0
System.ArgumentException: Font 'Berlin Sans FB Demi' does not support style 'Regular'.
   at System.Drawing.Font.CreateNativeFont()
   at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font..ctor(String familyName, Single emSize)
   at #=qHo24ViiA15NJzOL3GK5m1vrnqPSBkWkLrGh99BPJeMkC0DcF_MbjBgITh3n6qxE5.#=qjplg_L82E0Xg0s_bj9xxBA==(String #=qQQruRS1lDuZ8R043DPHHHA==)
   at #=qHo24ViiA15NJzOL3GK5m1vrnqPSBkWkLrGh99BPJeMkC0DcF_MbjBgITh3n6qxE5.#=qcDSGiSoYRcO$pA4OHbj6lidZVtQ01zyKkeL0J0b98CQ=(String #=qnlqGNKkQdaejER8MvivtSQ==, String #=q$osS4I_p7HQiDM0ZIhC0NA==, StringBuilder #=qoX3LtwEMTwVtsmt9STdHog==)
   at #=qHo24ViiA15NJzOL3GK5m1vrnqPSBkWkLrGh99BPJeMkC0DcF_MbjBgITh3n6qxE5.#=qcsg2uUFlLC9pzHSKoK$luQ==(String #=qdPlOgH_gUbGsYcD6Fzu5xw==)
   at #=qHo24ViiA15NJzOL3GK5m1vrnqPSBkWkLrGh99BPJeMkC0DcF_MbjBgITh3n6qxE5.#=qi$d4PFuKeARa5RmxHSTyLA==(String #=qa3WvtuHD5XjBbAkr_Mys9w==)
   at #=qX5CNAothrmrBH4uWf3fgqF24S9jFaIuqnl1ORg33yZM=.#=qnGL4BlAw5IhLHf87CCjUTH5EwYFlnEPPTDYNTFGollQ=(String #=qa3WvtuHD5XjBbAkr_Mys9w==)
   at Aspose.Email.Outlook.MapiMessageItemBase.#=qzoVtz4vZC4OFuiR6JJHyKw==()
   at Aspose.Email.Outlook.MapiMessageItemBase.get_BodyType()
   at Aspose.Email.Outlook.MapiMessageItemBase.get_Body()
   at Aspose.Email.Outlook.MapiMessage.#=qLKduVlKjqt6v8U9nhnSlQg6hHgTOuL2m69iE7sbrE_4=(MailMessage #=qG8RQcgnLwPk7aJYoBzvfvw==, MapiConversionOptions #=q7RDJ975MHi0QoVEayd54RQ==)
   at Aspose.Email.Outlook.MapiMessage.#=q_XAvML02mZWLFrSi21sZDJjz3oNIVMP3fF9OMl7tGgk=(MailMessage #=qFRRTnbgYy1j55fMaBqg6Fg==, MapiMessage #=qiCQ3qnBXDu7pnGLS3Rlb_g==, MapiConversionOptions #=q7RDJ975MHi0QoVEayd54RQ==)
   at Aspose.Email.Outlook.MapiMessage.#=qMTi$pGkbiv14HDhpRJJsQw==(MailMessage #=qG8RQcgnLwPk7aJYoBzvfvw==, MapiConversionOptions #=q7RDJ975MHi0QoVEayd54RQ==)
   at Aspose.Email.Outlook.MapiMessage.FromMailMessage(MailMessage message, MapiConversionOptions options)
   at Aspose.Email.Mail.MailMessage.Save(Stream stream, SaveOptions options)
   at Aspose.Email.Mail.MailMessage.Save(String fileName, SaveOptions options)

Exception of type 'System.OutOfMemoryException' was thrown.

$
0
0
Hi Support,

I am getting error while sending email without attachment. I am using Aspose.Email.dll, v6.9.0.0.  Below is the exception :

Inner exception: "Exception of type 'System.OutOfMemoryException' was thrown."

Stack Trace:
"   at Aspose.Email.Mail.SmtpClient.#=qXpJ35R2Kgz2MYmAGI$rjDA==(IConnection #=qDcF0lfo79WbpwdX1lX3y5w==, IEnumerable #=qPnntbmwKRLjjz1AteckEVQ==, EventHandler`1 #=qnVW_C0EsjJEndxMvtVDIh8ytS7zRWeDnHnShRAZbIgc=)
   at Aspose.Email.Mail.SmtpClient.Send(MailMessage message)"

I am sending email in iteration and after 100 or 200 items, smtpClient.Send(message); method throw out of memory exception.

Note:
1. Exception only came when memory cross 220 mb.
2. Object of Aspose.Email.Mail.SmtpClient class never release its memory.

Please suggest me what went wrong.

Encoding problem loading Aspose MailMessage from msg/eml stream

$
0
0
Hi,

we are using Aspose.Email (Version 16.12.0) to load Aspose MailMessage objects from msg-/eml-Streams.
Before loading the MailMessage we don't know the encoding (they are randomly), so default constructor of EmLoadOptions and MsgLoadOptions are used.
The problem is, on loading emails with BodyType = PlainText and BodyEncoding = System.Text.SBCSCodePageEncoding (CodePage = 1252, EncodingName = Western European (Windows)), german umlauts and other special character will not be converted correclty. In the Body property unreadable chars like Ã¼  Ã¶ or ß are shown.
We can not set a PreferredTextEncoding, because we don't know the underlaying encoding of the streams.
If the streams are HTML emails, the encoding looks fine.

Is this a bug or is there any way to determine the encoding (ISO, Latin1, UTF8, Unicode) before loading the MailMessage?

Thank you and Greetings,

Johannes


MBOX to PST

$
0
0
Hello,

Is There a way to read and convert from a MBOX file to PST file using Aspose.email?

Thank & regards!
Mantu Malakar

Recurring calendar event and modified occurences

$
0
0
Hi,
I have some event that is recurring master and list of modified occurrences, how can I import them into PST in that way ?

Thanks.

EML files with single attachment, attachment not recognized

$
0
0

Hi, 

One of our clients has found some eml files whereby the attachment is not recognized by Aspose.Email for .NET. 


I use the following code:


theMessage = MailMessage.Load(inputFileName);
foreach (Attachment attachment in theMessage.Attachments)
{
    // do something
}


Apperently there is no attachment in theMessage.Attachments.


Could you check the attached messages and tell me if this is a problem in the eml files, something I have to handle in my code or a bug in Aspose.Email for .NET.


Best regards

Andreas Ruge


How to create a new MapiRecipient without an email address?

$
0
0
I have found that I am unable to create a new MapiRecipient unless I give the method an email address. So the following snippet will throw an error:

MapiRecipientCollection rc = new MapiRecipientCollection();
rc.add("", "Vernon", 1);


My requirement is that I be able to create a recipient exactly as I found it. In this case my source MSG file has a recipient that has no email address. Basically PR_EMAIL_ADDRESS is not present as a Mapi property.

Is there a way for me to create a MapiRecipient without an email address?

Email verifications.

$
0
0
I am trying to check the email component ..
I first add L: Aspose.Email.dll  to my project.. then write sample code to verify email ..

Error message appears after run the app:

"The mail address is invalid,return code is : MailServerValidationError."

Is there any setting need to be changed somewhere ..??
Is there any help for that..
Thanks
Faris

Several question about Aspose Email

$
0
0
Hi there

We are recently testing and developing an application for MSG files.
And it come with several problems.

1. 
We convert MSG files into HTML format for cross-platform viewing.
Is it possible to embed or generate font resource when converting to HTML files,
if the font is used in the content and the system running the application also have the fonts installed?

2.
With Microsoft Outlook, you can easily click switch next or previous content by the buttons in of a replied email series for a single MSG file.
Is it possible to save it as multiple HTML pages, or a single HTML page with HTML anchor?

3.
If there is still a single HTML generated with a MSG file, is there an option to add horizon lines separating each reply in the result?



Craig

Viewing all 1367 articles
Browse latest View live