Set up appointment and sending email

HI,

I am creating appointments in Outlook with versiin 4.8.0. I attach the attendees to the appointmnet, but I would like to send an emaial only to a specific atteendee, not all

Is it possible?

// Set up Aspose Netwrok client - NO SMTP AUTHENTICATION

Aspose.Network.Mail.MailAddressCollection attendees = new Aspose.Network.Mail.MailAddressCollection();

//this is the main attendant

attendees.Add(new Aspose.Network.Mail.MailAddress(email, firstName + " " + lastName));

//this adds a Contact email, who will be in the appointment, but I would not want the system to send the email to,

//because the email doesn't exist in the system

attendees.Add(new Aspose.Network.Mail.MailAddress(defaultEmail, contFirstName + " " + contLastName));

Aspose.Network.Mail.SmtpClient client = new Aspose.Network.Mail.SmtpClient(exchange, 25);

client.AuthenticationMethod = Aspose.Network.Mail.SmtpAuthentication.None;

Aspose.Network.Mail.MailMessage msg = new Aspose.Network.Mail.MailMessage();

// Set key Appointment fields

// Subject is set on message here

msg.From = schedulerEmail;

msg.To = attendees;

msg.Subject = subject;

msg.Body = body.ToString();

Aspose.Network.Mail.Appointment appointment = new Aspose.Network.Mail.Appointment(location, finalStartDate, finalEndDate, schedulerEmail, attendees);

appointment.UniqueId = appointmentRequestId.ToString();

msg.AddAlternateView(appointment.RequestApointment(method));

client.Send(msg);

Can I make the system to not attempt to send the email to my COntact?

thanks

Daniela

Hello Daniela,

In this case, you should not assign the attendees to msg.To. You can only set the msg.To property to the email address you want to send the appointment.

Thanks

So, my appointment is between my Iinternal adn External Client.

From what I understand, I don't create an Attendeed record, instead I should just set

msg.To = myInternalClientEmail

What about the appointment, because in the appointment I'd like to see both names: for Internal and External Client . Just not send email to the External one.

is there an Attendeed property for Appointment? Do I have to set that up?

Thanks for your help

Daniela

Hi Daniela,

Please use Appointment.Attendees property for setting the list of persons, to be included in the appointment. For example, person1@domain.com and person2@domain.com. This property is for setting the attendees only, no email will be sent based on this property.

For sending out emails, please set MailMessage.To property. For example, if you want to send email only to person1@domain.com, just include this address. This way, no email would be sent to person2@domain.com.

Thank you Saqib,

I think this is working now.

Daniela