Is it possible to set the "from" field in the email message?
-
Friday, May 04, 2012 7:30 PM
hi Everyone,
We are using EWS java api 1.1 for a web application we have that is used to send emails to students .Now, currently the email has the "from" field set to noreply-learningsuite@byu.edu by default.
The from field doesn't change even after specifying it explicitly in the code
EmailMessage msg=new EmailMessage(service);
msg.setFrom(new EmailAddress("someemail@hotmail.com"));
msg.setSubject("testing!");
msg.setBody(MessageBody.getMessageBodyFromText("This is just a test message and should be discarded"));
msg.getBccRecipients().add("recipient@gmail.com");
msg.send();
I need to be able to set this field("from") to some address so that the recipient can reply back to that email. Just like when sending email through gmail, the received mail will have your gmail address in the from field and the recipient can reply back to that address. I need the same behavior for exchange emails.
Thanks for your help! I hope to hear your reply soon :D
All Replies
-
Friday, May 04, 2012 7:43 PM
Hi,
out-of the box it is not possible but you are able to configure this feature when configuring a special permission
Get-ReceiveConnector "rz-hub1\Client RZ-HUB1" | Add-ADPermission -user "NT AUTHORITY\Authenticated Users" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Sender"
Furter information about this setting you will get here: http://technet.microsoft.com/en-us/library/aa996395.aspx
regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
-
Friday, May 04, 2012 8:01 PM
hi Peddy1st,
Thanks for the instant reply. Does this need to be configured in the exchange server or can i do it in the web application somewhere in the above code. Thanks again!
-
Friday, May 04, 2012 8:53 PM
Hi,
no you have to configure it on the Exchange hub Transportserver
regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
-
Tuesday, May 08, 2012 8:51 PM
Hi,
could I help you? If your question is answered it would be nice if you mark it accordingly because this may help others who have got the same or a similar question.
Thanks a lot in advance
Kind regards
Thomas
regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
- Edited by Peddy1st Thursday, May 31, 2012 9:53 PM

