|
[VB.NET] | |
Function GetSubject
(NotificationID As String)
As
String |
|
NotificationID |
Notification ID |
|
Subject value |
VB.NET
Example |
Switch to language:
[C#] |
|
| 'Create personalizer object and Session object |
| Dim pers As New PersonalizerRef.Personalizer()
|
| Dim sess As New SessionRef.Session()
|
| Dim SessionID As
String = "" |
| Try |
| SessionID = pers.CreateSession("LogonName", "Password") |
| 'Create Mail notification proxy object |
| Dim objMail As New MailRef.Mail()
|
| 'Create server notification object |
| Dim MailNotifID As
String = 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 e As Exception |
| 'Print exception message e.Message |
| sess.Release(SessionID) |
| End Try |