I am having a workflow for a document library. Whenever the workflow starts, it sends an emails with From: Documents. I want to change it to the current user. How is it possible?
You can change the From field with Visual Studio. In the workflow design in Visual Studio, double-click the "send email" icon which needs the modified "from" field. Set the from property. Assuming my email method is called sendEmail, use the following code in the managed code:
By default, you cannot change the 'From' address for a workflow. The from address populates by where the workflow is attached, so it will always appear to be sent by wherever the workflow is 'activated'. (a doc library, list, etc.)
There's a project on codeplex to add this functionality: http://spdactivities.codeplex.com/
If possible, try adding a signature to the body of the text in the email that will populate with the current user's name. The from field would remain what it currently is, but you'll enable whoever is recieving the email to see who actually populated it.
_This Message was populated from a SharePoint Workflow by user: [%Workflow Context:Current User%] _