1. Tali Alafi Yaacov
  2. PowerBuilder
  3. Wednesday, 4 August 2021 08:03 AM UTC

hi

what is the way to define "from" in outlook application message.

for example from :tali@gmail.com

 Oleobject lole_msg

lole_msg = CREATE OLEObject

lole_msg = lole_session.CreateItem(0)
lole_msg.Subject = as_subject

 

lole_msg.from - this is not working

PB2019

the send and mail is ok but the "from" user is the current machine user

 

thx

tali

 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 4 August 2021 08:26 AM UTC
  2. PowerBuilder
  3. # 1

I think you have to use "SentOnBehalveOfName" and/or "SenderEmailAddress" and /or "SendUsingAccount".

See: https://docs.microsoft.com/en-us/office/vba/api/outlook.mailitem.senderemailaddress

 

Comment
  1. Tali Alafi Yaacov
  2. Thursday, 2 September 2021 11:38 AM UTC
10x

I used "SentOnBehalveOfName"

this is my code:

Oleobject lole_msg

lole_msg = CREATE OLEObject

lole_msg = lole_session.CreateItem(0)



ls_default_account = "xx@gmail.com"

lole_msg.SentOnBehalfOfName = ls_default_account

The email should be set up on the computer so that in Outlook you can select this box mail in the "from" section



  1. Helpful 3
  1. Miguel Leeuwe
  2. Thursday, 2 September 2021 11:40 AM UTC
Thanks for sharing!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.