Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending email through Groupwise
Message
De
01/11/2001 00:15:36
 
 
À
31/10/2001 19:02:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00543209
Message ID:
00576011
Vues:
23
>Henry - in the following code you kindly shared with us, is there a way to get GW to display the message on the screen rather than automatically sending it using oMessage.send()? This would give the user the chance to edit or add other ad hoc attachments.
>
>Thanks for any help...
>
>Barry.
>
>>
>>Here's the code I use, which creates a GroupWise object and uses a "blind" login, using the local address book and defaults. This assumes GroupWise is installed on the local machine. In my shop, GW is installed on every pc, so no question. I use this code to send an email to me when an error occurs in one of my apps.
>>
>>
#DEFINE EGW_HIGH 3
>>#DEFINE EGW_NORMAL 2
>>#DEFINE EGW_LOW 1
>>
>>*
>>*  This constant holds the email address of the recipient of this email.
>>*  It can either be a name in the sender's address book (as below) or
>>*  an email address in the form "Internet:henry@profutures.com".
>>*
>>local SYSTEM_ADMIN
>>SYSTEM_ADMIN = "Henry Rohlfs"
>>
>>*
>>*  Compose the body of the message
>>*
>>local lcBody
>>lcBody = "WARNING! An error occurred in an application." ;
>>         + ...
>>
>>*
>>*  Start a GroupWise session, login with defaults and add a
>>*  new message to the mailbox.
>>*
>>oGW = createobject("NovellGroupWareSession")
>>oAcct = oGW.Login("", "")
>>oMessages = oAcct.MailBox.Messages
>>oMessage = oMessages.Add()
>>
>>*-- Create the message
>>oMessage.Priority = EGW_HIGH
>>oMessage.Subject  = "Application Error Alert"
>>oMessage.BodyText = lcBody
>>
>>*-- Add a recipient to the recipient collection, then
>>*-- resolve the name against the default address book.
>>*-- If you use just an Internet email address for the
>>*-- recipient, use instead,
>>*--    oMessage.Recipients.Add()
>>*-- No need to use the .Resolve() call.
>>oMessage.Recipients.AddByDisplayName(SYSTEM_ADMIN)
>>oMessage.Recipients.Resolve()
>>
>>*-- Send the message
>>oMessage.Send()
>>
>>*-- Release the session
>>release oGW
-Henry-
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform