Mail


GetFormat

Gets the content type of the body of the e-mail message

Call Method
[C#]
   String GetFormat (String NotificationID)
Parameters
   NotificationID
         Notification ID
Return value
         Message body format - "text" or "html"
C# Example Switch to language: [VB.NET]
  //Create personalizer object and Session object
  PersonalizerRef.Personalizer pers = new PersonalizerRef.Personalizer() ;
  SessionRef.Session sess = new SessionRef.Session() ;
  string SessionID = "";
  try{
      SessionID = pers.CreateSession("LogonName", "Password");
      //Create Mail notification proxy object
      MailRef.Mail objMail = new MailRef.Mail() ;
      //Create server notification object
      string MailNotifID = sess.CreateMailNotification(SessionID);
      objMail.SetFrom(MailNotifID, "infomail@somebody.com") ; //set "from" address
      objMail.SetTo(MailNotifID, "abonent@somebody.com") ; //set destination address
      objMail.SetSubject(MailNotifID, "Notification Mail.") ; // set subject
      objMail.SetFormat( MailNotifID, "text") ; // set format of message body
      objMail.SetBody(MailNotifID, "You have made an appointment on 1:30pm.");
      objMail.Send(MailNotifID);
      // Print message properties
      Console.WriteLine(objMail.GetFrom(MailNotifID));
      Console.WriteLine(objMail.GetTo(MailNotifID));
      Console.WriteLine(objMail.GetSubject(MailNotifID));
      Console.WriteLine(objMail.GetFormat(MailNotifID));
      Console.WriteLine(objMail.GetBody(MailNotifID));
      objMail.Release(MailNotifID);
      sess.Release(SessionID);
  }
  catch(Exception e){
      //Print exception message e.Message
      sess.Release(SessionID);
  }