Highlighted
Absent Member.
Absent Member.
1593 views

[archive] outlook properties

[Migrated content. Thread originally posted on 23 January 2008]

I am trying to set @sendername or @sendermailaddress as follows:

CREATE APPLICATION OF OUTLOOK HANDLE IN OUTLOOK-HANDLE
MODIFY OUTLOOK-HANDLE, CREATEITEM (OLMAILITEM) GIVING MAIL-HANDLE
MODIFY MAIL-HANDLE @SUBJECT "Purchase Order"
MODIFY MAIL-HANDLE @TO "Keith@digitv.net".
MODIFY MAIL-HANDLE @SenderEmailAddress "accounts@digitv.net".
MODIFY MAIL-HANDLE @SenderName "accounts department".

I get complier error as follows;

'SENDEREMAILADDRESS' must be a 'put' property or method of '@MAILITEM'
'SENDERNAME' must be a 'put' property or method of '@MAILITEM'

Please tell me where I am being stupid?
😞
0 Likes
7 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] outlook properties

Look at SenderName and SenderEmailAddress properties in the def file that was created.

It sounds like they are only GET properties, which means you could INQUIRE them to retrieve their values, but not MODIFY them to set their values.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] outlook properties

Youare quite correct - only GET properties.

I wanted to change the email address that is in the 'from' field and will be the one used for the 'reply' or 'reply all' when it gets to the recipient. (As you can do easily with SMTP).

How do you do this with Outlook?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] outlook properties

Have now tried to use 'sendonbehalfof' - with mixed results.

We are using outlook and exchange server.

The message goes into my 'sent mail' folder in outlook just perfectlt - i.e. with the 'FROM:' set to the value i assigned to the 'sendonbehalfof' but i get a return (presumably from exchange' that says:
You do not have permission to send to this recipient. For assistance, contact your system administrator.
The name I have given for the 'sendonbehalfof' is a distribution list in exchange for incoming mail (i.e. accounts@....).
This works fine when I use SMTP - is this an exchange problem? an outlook problem - or is it just me?
Anyone know the trick here?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] outlook properties

You are a bit off track. Which I can understand, the mail model in Outlook is not very intuitive.
Recipients are their own classes. Here is an example:

       01 HApplication              HANDLE OF APPLICATION.
       01 HMailItem                 HANDLE OF MAILITEM.
       01 HRecipients               HANDLE OF RECIPIENTS.
...
CREATE  Application      HANDLE IN HApplication.
MODIFY  HApplication     CreateItem(0) GIVING HMailItem.
INQUIRE HMailItem        Recipients IN HRecipients.
MODIFY  HRecipients      @Add("[EMAIL="johndoe@acme.com"]johndoe@acme.com[/EMAIL]").
MODIFY  HMailItem        Subject = "testing".
MODIFY  HMailItem        Body = "testing".
MODIFY  HMailItem        @Send().
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] outlook properties

hi Gisle

The addition of using
.......MODIFY HRecipients @Add("keithb@digitv.net").
seems to do the same as using
.......MODIFY MAIL-HANDLE @TO "keithb@digitv.net"
except that MSOutlook requests a security dialogue about accessing outlook addresses when using the 'HRecipients' and does not using '@TO'.

Maybe I am not explaining myself clearly?
When I set
@SentOnBehalfOf
to
accounts@digitv.net
it is this that triggers the message that
You do not have permission to send to this recipient. For assistance, contact your system administrator


Interestingly, if I replace my
@TO
with your
HRecipients
statement, it then also objects in the same way to the this email address - which it did not in my original method.

Everything is/was working correctly - except I cannot change the FROM address shown in the email to the distribution list defined in our MS Exchange mail system(i.e. accounts@digitv.net or support@digitv.net) so that this is the adreses used when customers reply to the email.

Again this all works fine with the SMTP method, but I have many requests from customers to use Outlook.

Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] outlook properties

Oh happy days - and I was just not trying enough alternatives.

It did not like me setting the SentOnBehalfOf to the email address, but is happy for me to just set it to the distibution list name (i.e. does not like 'accounts@digitv.net', but is happy with 'accounts'). Replying works perfectly and sends back to 'accounts@digitv.net'. I presume this is MS Exchange behaviour.

Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] outlook properties

Cool! 🙂
Sorry for misunderstanding, but the happier I am that you found a solution.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.