vRMail can have 3 values, although I'm not sure of the difference between N (undeliverable) and A (aborted). Below is code for logging emails to a history table (CommunicHist) for each mailee(?). Items logged are: MemberID, a datetime stamp, method (email, USPS, etc) and the ID of what was sent.
Doug

SET VAR vRMail = (UDF('@RMail.DLL','SHOZEmail.MAL'))
 SWITCH (.vRMail)
   CASE 'S'
     -- Log email into history table
     INSERT INTO CommunicHist (MemberID,CommDateTime,CommMethod,CommID) +
      VALUES (.vMemberID,.#NOW,'eMail',.vCommID)
     BREAK
   CASE 'N'
     SET VAR vMsg =  ('Message Undeliverable! MemberID =' & .vMemberID)
     PAUSE 2 USING .vMsg CAPTION 'MESSAGE'
      INSERT INTO CommunicHist (MemberID,CommDateTime,CommMethod,CommID) +
      VALUES (.vMemberID,.#NOW,'eMail',('Undeliverable' & .vCommID))
     SET VAR vMsg = ' '
     BREAK
   CASE 'A'
     PAUSE 2 USING 'Delivery was Aborted!' CAPTION 'MESSAGE' +
      AT CENTER CENTER
     INSERT INTO CommunicHist (MemberID,CommDateTime,CommMethod,CommID) +
      VALUES (.vMemberID,.#NOW,'eMail',('Aborted' & .vCommID))
     SET VAR vMsg = ' '
     BREAK

   DEFAULT
     BREAK
 ENDSW

Bernard Lis wrote:

----- Original Message ----- From: "Bernard Lis" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Thursday, November 11, 2010 8:23 PM
Subject: [RBASE-L] - RMail


SET VAR vSendMail = (UDF('@RMail.DLL','MessageFile.mal'))

I meant to say:  vSendMail = S  not Y

If the value of vSendMail is Y does that mean it was sent ok?
if = N does that mean it was not sent?
If not sent, is there a way to determine why it was not sent?

Bernie Lis








Reply via email to