Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Troubles with GroupWise - again!
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Troubles with GroupWise - again!
Miscellaneous
Thread ID:
00615576
Message ID:
00615576
Views:
48
Hi Henry,

We found, that when GroupWise uses external addresses for sending mails with attachments, about 25% of all mails come to the client without attachment, subject and message body. I've ran couple of tests with this simple test program:
********************************************************************
*  Description.......: TestEMail - program, which allows to demonstrate the problem with sending mails with attachments
*  Calling Samples...: 
*  Parameter List....: 
*  Created by........: Nadya Nosonovsky 02/05/2002 10:39:22 AM 
*  Modified by.......: 
********************************************************************
local lnFiles, lnI, oFSO, oFolder, lnCount, lcStr, CR, lnReturn
lnCount = 0
CR = chr(13)
oFSO = createobject('Scripting.FileSystemObject')
oFolder = oFSO.GetFolder("\Redp\Appl\CommonWg\Progs")
lcStr = 'List of sent files through the program:'+ CR
with oFolder
	for each oFile in .files
		with oFile
			if upper(justext(.path))="PRG"
				lnCount = m.lnCount +1
				*FunctionID = m.lnCount
				FunName = juststem(.path)
				*FunctionCode = filetostr(.path)
				*FunPath = justpath(.path)
				*ModiDate = .DateLastModified
*insert into AllFunctions from memvar
				lcStr = lcStr + transform(m.lnCount)+" "+.path + CR
				wait window nowait m.FunName
				lnReturn = MailWithGroupWise('sergeyb@isgcom.com;nosonov@msn.com;nnosonov@thewarrengroup.com',m.FunName, ;
				           'Hi everybody, '+CR+chr(10)+"This is a test of "+ m.FunName,.path)
				if m.lnCount > 15 && Stop now
					exit
				endif
			endif
		endwith
	endfor
endwith
do form statistics with m.lcStr,'GroupWise Test'
Where MailWithGroupWise is this text:
********************************************************************
*  Description.......: MailWithGroupWise
*  Calling Samples...: MailWithGroupWise('nnosonov@thewarrengroup.com','SUBJECT HERE','TEXT MESSAGE HERE ','O:\REDP\OUTPUT\CUstomer\Fares\Trwc0122.zip')
*  Parameter List....: cSendTo,cSubject,cMessage,cAttachment
*  Created by........: Robert Peirce
*  Modified by.......: Nadya Nosonovsky 09/11/2001 01:37:42 PM
********************************************************************
lparameters cSendTo,cSubject,cMessage,cAttachment
if vartype(m.cSendTo)<>"C" or empty(m.cSendTo)
	=messagebox('Invalid Send To parameter passed',48,"Invalid parameter")
	return -1
endif
local oGW, lcOldError, lnReturn
lcOldError=on('error')
on error lnReturn=-1
lnReturn=0
oGW=createobject('NovellGroupwareSession')
if vartype(oGW)='O' && Group Wise object was successfully created
	local oMsg, loRecipients, lnRecipients, lnI, lnAttachments
	oMsg=oGW.Login.RootFolder.messages.add
	oMsg.Subject=m.cSubject
	oMsg.BodyText=m.cMessage
	lnRecipients=alines(laRecipients,strtran(m.cSendTo,";",chr(13)))
	if vartype(m.cAttachment)='C' and !empty(m.cAttachment)
		cAttachment=strtran(m.cAttachment,',',';') && Replace comma with semicolon
		lnAttachments=alines(laAttachments,strtran(m.cAttachment,";",chr(13)))
	else
		lnAttachments = 0 && No attachments
	endif
	for lnI=1 to m.lnRecipients
		cSendTo=laRecipients[m.lnI]
		if '@' $ m.cSendTo 
		    if left(m.cSendTo,5)<>'inet:'
		       m.cSendTo = 'inet:'+ m.cSendTo
		    endif     
			loRecipients=oMsg.Recipients.add(m.cSendTo,'NGW','0')
		else
			loRecipients=oMsg.Recipients.AddByDisplayName(m.cSendTo)
		endif
		loRecipients.Resolve()
	endfor
	for lnI=1 to m.lnAttachments
		cAttachment=laAttachments[m.lnI]
		if !file(m.cAttachment)
			=messagebox("File "+ m.cAttachment+" is not found!",48,'File not found')
			lnReturn=-1
			exit
		endif
		oMsg.Attachments.add(m.cAttachment)
	endfor
	if m.lnReturn=0 && No errors yet
		oMsg.send
	endif
	release oGW
else
	lnReturn=SendMails(,,m.cSendTo,m.cSubject,m.cMessage,m.cAttachment) && Wrapper for Nigel's class
endif
on error &lcOldError
return m.lnReturn
I've ran the same program using Outlook Express as a mail client, and everything went smoothly. I had couple of threads related to the problems with GroupWise we had. I thought, MailWithGroupWise solved them all. However, it doesn't seem to be the case. Do you have any suggestions in regard to the current problems, we have? Or we need to resort to some commercial products like IdsMail?

Thanks in advance for your help.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform