Hi,
When send an Task email to a user then in the inbox some headings are populated additionally, Why so? Please see the attached screenshot and suggest me what changes need to be implement.
I am using MapiTask and SMTPclient to send the email with UseTnef True.
Hi Vipin,
Thank you for contacting Aspose support team.
A MapiTask object is initiated and sent by email to another user. However, there is no extra heading found in inbox view as shown in the attached image. Could you please test the following sample code and share your feedback with us.
private static void CheckTask()
{
MapiTask task = new MapiTask("Task Subject 2", "Task Body 2", new DateTime(2015, 4, 3, 8, 0, 0), new DateTime(2015, 4, 3, 17, 0, 0));
MemoryStream stream = new MemoryStream();
task.Save(stream, TaskSaveFormat.Msg);
MapiMessage msg = MapiMessage.FromStream(stream);
// Convert to TNEF eml. Such a feature would allow to send messages by mail clients,
// where the information, specific for Outlook task, would be stored.
MailMessageInterpretor mi= MailMessageInterpretorFactory.Instance.GetIntepretor(msg.MessageClass);
MailMessage eml = mi.InterpretAsTnef(msg);
eml.From = "username@gmail.com";
eml.To.Clear();
eml.To.Add(new Aspose.Email.Mail.MailAddress("to@domain.com"));
SmtpClient client = GetSmtpClient();
client.UseTnef = true;
client.Send(eml);
}
Hi Muhammad,
Thanks, I tried with your above sample code but i am not sure why it happened at my end. But thanks for your reply.I really appreciate it. Can you please see the below points that i really need your input,
1. What exactly GetSmtpClient() method is?
2. May be as I am using Trial for Aspose, if so then is there a way to resolve temporary, i have to give demo to client using Aspose to send the Task email and to purchase the licence of Aspose.
3. Also see the highlighted item in your inbox screenshot, no sender information present above the Task Subject. That should be otherwise how a user know about the sender of the sent Task.
Please check with outlook.
* Create a new Task with Outlook and save it.
* Now open it and assign to yourself, then send.
* See the Task in inbox with the sender.
4. Is there any update so far, how to update and delete a Mapitask? as you mentioned earlier - Team is working on that. Otherwise no mean to use Aspose Mapitask until and unless it is not being updated or deleted.
Thanks in advance,
Vipin Panwar
Hi Muhammad,
I want to discuss one more below scenario regards Manage the MapiTask.
Suppose using above sample code i.e. to create a new MapiTask and send it to the assigned user.
In case a user close the Task then we need to marked the Task as completed that we created.
I suppose to read the outlook Task and marked it as complete or
As we using Memory Stream to read the MapiTask, To achieve the above we need to save it on the disc with a unique id and then set the status as completed.
But will it be synced with the Outlook? Please share your experience to achieve the same using Aspose API.
Also an email should be sent to the user who created the task notifying them the Task is complete.
Please share the sample code.
Thanks,
Vipin Panwar
Hi Vipin,
- Sorry for the confusion caused. The GetSmtpClient() is a local method in my sample application that actually returns SmtpClient object with specified user credentials. So, it is not something related to the API.
- You can get a 30-day temporary license for avoiding evaluation limitations and test the API for all the functionality.
- We already have logged this issue in our bug tracking system for investigation by our product team where the sender information is missing with UseTnef flag set to true. The issue is pending for investigation and resolution by our product team. We’ll update you here as there is some information available about this problem.
- For updating a task, you can Read a MapiTask and make changes as we already mentioned to u early. For deleting a MapiTask from disc, you can use the File.Delete(MapiTask file path) method of .NET to achieve this if the task is not added to PST.
For your other query of keeping track of a task and marking it completed, we have already answered your query in another thread that you wrote to us.
Hi,
Can you please guide me or share the sample code how to use/apply licence for the Aspose DLL programmatically. It would be wonderful for me if you share the sample code to resolve the evaluation additional message.
Thanks in advance
Vipin Panwar
Hi Vipin,
You can initialize the license in the very beginning of your application as shown in the following line of code. Please note that license initialization code should be used prior to any API calls.
Sample code:
Aspose.Email.License license = new Aspose.Email.License();
license.SetLicense(“Aspose.Email.lic”);
Hi Team,
Is there any update for the below item 3, as below are the lines by you.
3. We already have logged this issue in our bug tracking system for investigation by our product team where the sender information is missing with UseTnef flag set to true. The issue is pending for investigation and resolution by our product team. We’ll update you here as there is some information available about this problem.
Thanks,
Vipin Panwar
Hi Vipin,
We are sorry to share that the issue is still pending for analysis by our Product team. We shall notify you here once the issue is fixed and the release version is available for download.