Can I specify the sender from Progress?

WayneFrank

Member
I am using a progress program to create emails. That is working, but I need a further refinement:

I want the Progress program to specify the sender of the email .

Some of my code:

ASSIGN chmail:Subject = subject
chMail:Body = body
chMail:BCC = mailto.

Is there something like chMail:from? When I tried chMail:from, it gave the error

Error occurred while accessing component property/method: from. Unknown name.

Does anyone know how to do this? Thanks.
 

WayneFrank

Member
Code:
DEFINE VARIABLE chOutlook AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chmail AS COM-HANDLE NO-UNDO.
 
...
 
 
  CREATE "outlook.application" choutlook NO-ERROR.
  ASSIGN chmail = chOutlook:createItem(0).
 
  /* Create email. */
  ASSIGN chmail:Subject  = subject
          chMail:Body = body
 
          chMail:BCC = mailto.
     
          chMail:from =  "wmckinstry@court.state.il.us".
     
 
  /** view mail **/
  chMail:Display(0).
     
  RELEASE OBJECT chmail.
  RELEASE OBJECT choutlook.
 

Osborne

Active Member
It appears from the Outlook Object Model Reference - msdn.microsoft.com/en-us/library/ff870913(v=office.14).aspx - that there is no "From" option which is odd. There is "ReplyRecipients" and "SenderEmailAddress" but these appear to be read-only.

One possible solution is maybe use "SentOnBehalfOfName":
Code:
chMail:SentOnBehalfOfName = "wmckinstry@court.state.il.us".
 
Top