Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending email through Groupwise
Message
 
 
To
20/08/2001 15:08:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00543209
Message ID:
00546395
Views:
16
>>
>>My question is: do you translate this code into VFP (it would be tough for me), or created DLL (FLL) and use it? Could you please elaborate?
>>
>>Thanks again.
>
>Sorry I took so long to get back with you. I've been on "vacation" getting our daughter off to college!
>
>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,

First of all, thanks a lot for the code. Now there are the questions:

1)oMessage.Recipients.Add("Internet:henry@profutures.com"), right? How can you check, if this address in GroupWise Address book or not (or it's better to always use internet addresses?)

2) How do you add attachments (one or few)?

3) Does it depend on which e-mail client is installed on PC (e.g. I can have GroupWise installed, but have Outlook Express as default mail client)?

4) Do you have some code to check a presence of GroupWise (in case, GroupWise is not installed on the PC)?

Thanks again, it's very helpful.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform