License vs evaluation issue

Hello,

We bought the aspose.email product this week to implement in our application. The license has been added to our solution as explained on your site. The license is embedded in our solution and activated as also explained on your site.

When i'm sending a message everything works fine. No evaluation text in the subject. However, in our solution sometimes the e-mail message is being save to our archive before being send out. When we do save a message to our archive and then retrieve it again, it has the evaluation text in the subject line again. So it looks like that the license is implemented when a message is actually being send.

How do i save a message without the evaluation text in the subject?

Kind regards,

Jacob

Hi Jacob,


Thank you for contacting Aspose support team.

I have tested the scenario by creating and saving a mail message on disc with and without a license. I am afraid to share that the evaluation version message was added to the subject of the mail only that was created without license.

Could you please perform simple test by trying the following sample code with and without loading the license file and let us know your feedback?

MailMessage mail = new MailMessage("user@gmail.com", "user2@gmail.com", “Test Subject”, “Test body”);
mail.Headers.Add(“X-Unsent”, “1”);
mail.Save(@“D:\Aspose\TestMsgWitLicense.eml”,MailMessageSaveType.EmlFormat);
It seems that when mail is saved on disc in your application, the code for loading the license in not executed. Please make sure that when mail is saved in you repository, license is loaded properly before it.

Please feel free to write us back if you have any other query in this regard.

Hi,I did some further testing with following results. I put the license in the New routine of a class i'm using like this:

Public Sub New()
'Instantiate the License class
Dim license As Aspose.Email.License = New Aspose.Email.License()

	<br>'Pass only the name of the license file embedded in the assembly
	<br>license.SetLicense("Aspose.Email.lic")
<br>End Sub	</p><p>In this class i have both a send subroutine and a savedoc subroutine. With the send subroutine there were no problems with the evaluation text but with the savedoc the problem occurs. Now when i put the licence code in the savedoc sub routine the evaluation text is gone.</p><p>So what's the best place to put the licence code in?</p><p>Regards,<br>Jacob</p>

Hi Jacob,

Thank you for the feedback.

The license call should be the very first in your application before any API functionality is used. If your application has two methods that need to be called from a Main() method, you can initialize the license in Main() method and call the other two methods then as shown in following code sample. Please note that License is initialized in the very beginning of the application before any API call is made. If you have any other inquiry in this regard, please feel free to write back to us.

static void Main(string[] args)
{
    Aspose.Email.License lic = new Aspose.Email.License();
    lic.SetLicense(@"C:\Users\Kashif\Desktop\Aspose Licences\Aspose.Total.Product.Family.lic");
    Method1_Save();
    Method2_Send();
    Console.WriteLine("Execution completed...");
    Console.ReadKey();
}
static void Method1_Save()
{
}
static void Method2_Send()
{
}

Hi,

Our application contains about 20 solutions and 30 classes. I now put the license code in the very top of the calling application and that solved the problem.

Thx.
Regards,
Jacob

Hi Jacob,


That’s exactly how it needs to be done. It’s good to know that your issue is resolved now. Please feel free to write to us in case you have any additional query/inquiry with respect to Aspose.Email. We’ll be glad to assist you further.