I am having the following in my .hbm.xml file

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                                    namespace="Core.Domain.Model"
                                    assembly="Core"&gt;

  &lt;class name="Category" table="Categories" dynamic-update="true"&gt;
    &lt;cache usage="read-write"/&gt;
    &lt;id name="Id" column="Id" type="Guid"&gt;
      &lt;generator class="guid"/&gt;
    &lt;/id&gt;
    &lt;property name="Name" length="100"&gt;
    &lt;column name="Name" unique="true" index="IX_Category"/&gt;
    &lt;/property&gt;
  &lt;/class&gt;
&lt;/hibernate-mapping&gt;




I am having the following code, however, I can see that no exception is being raised when I am inserting a duplicate value for the Name field. Why is that so? 

 void IRepository&lt;Category&gt;.Save(Category entity)
        {
            using (var scope = new TransactionScope(TransactionScopeOption.Required))
            {
            using (ISession session = NHibernateHelper.OpenSession())
            {
                using (ITransaction transaction = session.BeginTransaction())
                {
                    session.Save(entity);
                    transaction.Commit();
                }
            }
            scope.Complete();
            }    
        }



Question: how to send a mail by telnetting through some SMTP server?
Answer: Your ISP usually provides you with one you can access, if not - at least they'll have a relay you can authenticate and send e-mail through from an smtp server you set up yourself.