I was writing a custom code to send email using templates in CRM 4.0.
The code was working properly but the mails weren’t getting sent.
Checking at activities in CRM i found out the email activities have got created but were showing the status as “job pending”.
While searching for the same i found out that making modification to this file
C:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.xml
would solve this problem.
Especially these tags !!
Check this link for detailed information
and this post as well