|
|
SetBody
(String Text)
throw Exception
|
|
| Text |
| |
|
| | Personalizer pers = null; |
| | Session sess = null; |
| | try{ |
| | //Create personalizer object and Session object |
| | pers = new Personalizer(); |
| | sess = pers.CreateSession("LogonName", "Password"); |
| | //Create Mail Notification |
| | Mail objMail = sess.CreateMailNotification(); |
| | objMail.SetFrom("infomail@somebody.com")
;
//set "from" address |
| | objMail.SetTo("abonent@somebody.com")
;
//set destination address |
| | objMail.SetSubject("Notification Mail.")
;
//set subject |
| | objMail.SetFormat("text")
;
//set format of message body |
| | objMail.SetBody("You have made an appointment on 1:30pm."); |
| | //invoke method |
| | objMail.Send(); |
| | //Release Mail Notification object |
| | objMail.Release(); |
| | sess.Release(); |
| | } |
| | catch(Exception e){ |
| | //Print exception message e.Message |
| | System.out.println(e.Message); |
| | sess.Release(); |
| | } |