Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a scenario.

I need to code a workflow for sharepoint 2010 in VS2010.

I have a Account manager list.When the manager raise a request of candidate to Human resource team, an email should be sent to HR team.If HR team responds, it should be emailed back to Manager.

Briefly, how should I code to send email notification using workflow??
All the above should be done using workflow in VS2010.

Can someone help me please ????
Posted
Comments
Prerak Patel 11-Apr-11 6:42am    
Did you google?
Prerak Patel 11-Apr-11 7:27am    
Would let you know if I can find something for you.

I found out solution to this requirement

1.Create a sequential workflow.
2.Drag and drop Send Email activity below the onWorkflowActivated1.
3.Set the correlation token of SendEmail1 activity same as that of your workflow1.
4.Double click on the SendEmail1 activity which creates a method - sendEmail1_MethodInvoking.
5.Add these lines to send a mail -

<pre>sendEmail1.To = "Someone@someDoamin.com";
sendEmail1.From = "Someone@someDoamin.com";
sendEmail1.Subject = "Test Mail";
sendMail1.Body = "This is a test mail";</pre>

6.Build and deploy your solution.
7.Add this workflow to your list on successful deployment.
8.Activate this list to a prticular list item.
9.Do check your Outgoing Email settings in Central Administartion.

That's all folks !
 
Share this answer
 
 
Share this answer
 
Comments
Prerak Patel 11-Apr-11 7:25am    
Sorry, I am not a sharepoint guy, so couldn't figure out the difference. Still you can google it to come up with something like - "notification" email +sharepoint +vs2010

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900