Issue for concurrent emails. Sender address is getting overlap.
AKP1990
0
Reputation points
I am facing strange behavior for mails while using microsoftgraphapi. I am using below code. Issue is when 2 mails are getting triggered at same time, the sender's email id get overlapped. Suppose -> one mail sender is ******@abc.com and 2nd mail sender is ******@abc.com. When triggered at same time. The sender address of 2nd becomes ******@abc.com or vice -versa. The log prints the correct sender email ID. There is no such issue when mail is triggered at different time or after 1 or 2 mins, at that time senders are correct. The log shows correct id i.e ******@abc.com but sent from A.
Message message = generateEmailMessageForGraphAPI(emailMessageModel, emailBody);
LOG.error("From Mail Address is :-" +emailMessageModel.getFromAddress().getEmailAddress());
boolean saveToSentItems = true;
graphClient.users(userId)
.sendMail(UserSendMailParameterSet
.newBuilder()
.withMessage(message)
.withSaveToSentItems(saveToSentItems)
.build())
.buildRequest()
.post();
Sign in to answer