Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 Butler Jan 26 '12 at 0:30
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.