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?

  • 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

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"];
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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