SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have an event receiver(which has item adding,added events) based on a condition i have set the email to get generated in item added event, the email is getting generated on my dev machine but when i deployed it in the production it does generate email..any suggestions?

share|improve this question
Can you please post the code which is sending the emails? Have you configured and checked the Outgoing SMTP server in Central Administration? – Daniel Symonds-Lloyd Jan 26 '12 at 0:30
up vote 1 down vote accepted

It is working now. Few values were getting null values so I put conditions for all those values.

string client = (string)properties.ListItem["Client"];

//replaced by 

string client = ""; 
if (properties.ListItem["Client"] != null)
    client = (string)properties.ListItem["Client"];
share|improve this answer
Please mark this as answer as soon as you the system allows you to – Anders Rask Jan 26 '12 at 6:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.