MailMessage.Body

unable to get the html body while using MailMessage.Body

@Hemanthb

Please read the following article about extracting desired content of message.
Extracting Message Contents from Emails

If you still face problem, please share the input message file along with expected output. We will then provide you more information on it.

If i Use MailMessage.HtmlBody im getting the below content in the email body and in subject also.

(Evaluation Only. Created with Aspose.Email for .NET. Copyright 2002-2022 Aspose Pty Ltd.)

When i use the MailMessage.Body im getting the html view in the email body please find the below image as ref , is there any way to hide the content (Evaluation Only. Created with Aspose.Email for .NET. Copyright 2002-2022 Aspose Pty Ltd.) when i use MailMessage.HtmlBody.

Screenshot 2022-12-13 220934.png (9.3 KB)

@Hemanthb

Please get 30 days temporary license and apply it before loading message file to avoid the evaluation watermark issue.

Thank’s for the update.

is any way we can send Meeting ID or Link through Aspose.Email.
any particular Property?

@Hemanthb

Unfortunately, your requirement is not clear enough. Could you please share some detail about your requirement along with sample input file and expected output?

@tahir.manzoor

So, when we create a online meeting appointment for some one, we have to send them Meeting URL right.
My query is can we send the Meeting URL from below code.

Appointment appointment = new Appointment(
“Meeting Room 3 at Office Headquarters”,// Location
“Monthly Meeting”, // Summary
“Please confirm your availability.”, // Description
new DateTime(2015, 2, 8, 13, 0, 0), // Start date
new DateTime(2015, 2, 8, 14, 0, 0), // End date
“from@domain.com”, // Organizer
Join conversation…”, //Meeting URL (example)
“attendees@domain.com”); // Attendees

@Hemanthb

A ticket EMAILNET-40882 has been logged your requirement in our issue tracking system. We will inform you once there is an update available on it. We apologize for your inconvenience.

Hi @tahir.manzoor

     I have an error while sending a meeting. 

I’m not able to view the calendar invite when i send meeting to other include me.
please find the below code for reference.

Appointment app = new Appointment(
emailInfo.Location, // location of meeting
interview.StartDateTime, // start date
interview.EndDateTime, // end date
new MailAddress(smtp.EmailAddress),
attendees);

MailMessage msg = new MailMessage();
msg.From = smtp.EmailAddress; //hemanth@gmail.com
msg.To.Add(to); // also include hemanth@gmail.com

@Hemanthb

In case you are using the old version of Aspose.Email for .NET, we suggest you please upgrade to the latest version of Aspose.Email for .NET 22.11. Hope this helps you.

If you still face problem, please attach the following resources here for testing:

  • Your problematic output document.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

hi @tahir.manzoor

        Im Using the same code what u provided for the reference. please find the below code and images for the reference.
 // Create attendees of the meeting

MailAddressCollection attendees = new MailAddressCollection();
attendees.Add("recipient1@domain.com");
attendees.Add("recipient2@domain.com");

// Set up appointment
Appointment app = new Appointment(
    "Location", // location of meeting
    DateTime.Now, // start date
    DateTime.Now.AddHours(1), // end date
    new MailAddress("organizer@domain.com"), // organizer
    attendees); // attendees

// Set up message that needs to be sent
MailMessage msg = new MailMessage();
msg.From = "from@domain.com";
msg.To = "to@domain.com"; (in the To email also i mention From email)
msg.Subject = "appointment request";
msg.Body = "you are invited";

// Add meeting request to the message
msg.AddAlternateView(app.RequestApointment());

// Set up the SMTP client to send email with meeting request
SmtpClient client = new SmtpClient("host", 25 ,"user", "password");

client.Send(msg);

image.png (345 Bytes)
Screenshot 2022-12-22 154927.png (849 Bytes)

@Hemanthb

A ticket EMAILNET-40896 has been logged for this case. We will inform you once there is an update available on it. We apologize for your inconvenience.

We have examined your code and we can say that the SMTP client is not suitable for working with the Google calendar. Our API contains other suitable classes for working with Google calendar, please see:

Hi @alecs555
As of now I’m not using the Gmail calendar with the above (EMAILNET-40896) issue, I’m using the outlook for that, and I’m still facing the same issue can u help me out with this.

Hi Hemanthb
Outlook is just an email client, could you please clarify on which server the calendar is used(gmail.com, office365.com or other…)

Hi @alecs555
I’m using the office365.com.

Hi @Hemanthb,
Thanks for your cooperation.I did a few experiments and noticed that if you specify the same address for the meeting organizer, msg.From and msg.To. then the meeting invitation is placed in the ‘Deleted Items’ folder and comes with the disabled ‘Accept’ button and cannot be accepted.
If one of these addresses is different, everything works correctly and the invitation can be accepted.

Hi @alecs555
Thanks for your update.