Hi @Abhishek Vadakattu ProtonMe
According to the Graph Api, the sender's name and address cannot be customized, and in any case the sender must match the value of the actual mailbox.
Moreover, my test results showed that the sender's message was not random.
As to why it is flagged as spam, the possible reason is that the message is from an unknown sender, or that the sender's email name or address format is detected as spam.
See the solution to this problem:
https://stackoverflow.com/questions/55950384/microsoft-graph-api-mail-gets-send-but-in-spam
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.