Hi,
I am using the Java Aspose.Email trial library to validate my use case with the product.
I am trying to create an Outlook email message, which is to be sent from a group mailbox in exchange.
When the user clicks the send button, the email should be saved to the "sent " folder of the group mail box.
What I do is the following:
1. create a MailMessage, where I set from to the mail address of the group mailbox “gmb@domain.be”
2. Create a MapiMessage fromMailMessage(mail message created in step1)
3. Save the MapiMessage to MSG file
4. Open the MSG file in outlook
5. Click send button
6. Validate “sent folder” of group mailbox and of personal mailbox.
The email is correctly sent using the from address=gmb@domain.be. However, the email is not saved to the “sent folder” of the group mailbox, but is saved to the “sent folder” of my personal mailbox.
When I open the MSG file in outlook, I can see (when hovering over the from address) that outlook mentions the following: “From:gmb@domain.be Send Using Account: personal.email@domain.com”. Please have a look at the attached word doc for screen shots.
When I manually create in outlook an email, and select the from address, I don’t see the “Send using account” mentioned. Instead it shows (when hovering over the from address) the from: “From:gmb@domain.be”.
Is it possible using the Aspose.Email java API to have the same behaviour?
I have tried to put some properties on the MapiMessage, but without success. I tried the following:
1/ outlookMsg.setStringPropertyValue( MapiPropertyTag.PR_SENT_REPRESENTING_EMAIL_ADDRESS, “GMB@domain.be”);
2/ outlookMsg.setStringPropertyValue( MapiPropertyTag.PR_SENT_REPRESENTING_NAME, “GMB@domain.be”);
3/ outlookMsg.setStringPropertyValue( MapiPropertyTag.PR_SENT_REPRESENTING_NAME, “!GMB1”);
4/ outlookMsg.setStringPropertyValue( MapiPropertyTag.PR_ACCOUNT, “GMB@domain.be”);
I have added the java code I’m using in the attached zip file.
Can you help ?
Thank you,
Best Regards,
Guy
guy-dardenne:
When I open the MSG file in outlook, I can see (when hovering over the from address) that outlook mentions the following: "From:gmb@domain.be Send Using Account: personal.email@domain.com". Please have a look at the attached word doc for screen shots.
When I manually create in outlook an email, and select the from address, I don't see the "Send using account" mentioned. Instead it shows (when hovering over the from address) the from: "From:gmb@domain.be".
- Go to "Start menu -> Settings -> Control panel -> Mail"
- Click on Email accounts.
- On the tab "E-mail" click New account.
- Select "E-mail account" (remark: if this automatic config doesn't work, you should use the "Manually configure server settings or additional server types").
- Type the name (GMB) and email address (gmb&domain.com).
- Click next => the email account is added to your profile.
- Restart outlook.
- Click New Email.
- Click on the "From" dropdownbox to select the account you have added (instead of your personal email account).
- Send a message to any recipient.
- Go to the "Gmb@domain.com" account, and open the sent-items folder.
- You should find the sent email in the sent folder of the "gmb@domain.com" instead of in your personal account's sent items folder.
Hi Guy,
We are sorry for a delayed response. I would request you to please spare us a little more time in this regard as we are working over this query and will soon share our findings with you here.
Hi Kashif,
Were you able to reproduce the issue?
Did you find a solution or workaround?
Looking forward to your response.
Br,
Guy
Hi,
Any update on this issue NETWORKNET-34524 ?
Thx,
Guy
Hi Guy,
Hi Muhammad,
Situation A does actually work. If you create a new email in Outlook and you change the ‘From’ to a different mailbox and fill in something in the subject (Very important! Otherwise the ‘From’ is not persisted…), save it to the harddrive, open it, specify a recipient and send it then it gets indeed saved in the ‘Sent’-folder of the mailbox you assigned it to.
We currently use that as a workaround eg load a MSG-file in which the ‘From’ is already correctly set and go from there.
Hi Guy,