MailMessage mail = new MailMessage();

//set the addresses
mail.From = new MailAddress("hadmin@mydomain.net.com");
mail.To.Add("akhbari65@gmail.com");

//set the content
mail.Subject = "This is an email";

//first we create the Plain Text part
AlternateView plainView = AlternateView.CreateAlternateViewFromString("This is my plain text content, viewable by those clients that don't support html", null, "text/plain");

//then we create the Html part
//to embed images, we need to use the prefix 'cid' in the img src value
//the cid value will map to the Content-Id of a Linked resource.
//thus <img src='cid:companylogo'> will map to a LinkedResource with a ContentId of 'companylogo'
AlternateView htmlView = AlternateView.CreateAlternateViewFromString("Here is an embedded image.<img src=cid:companylogo>", null, "text/html");

//create the LinkedResource (embedded image)
LinkedResource logo = new LinkedResource("http://www.asp.net/App_Themes/Standard/i/logo.png");

کسی میتونه بگه که مشکل از کجاست؟

به خط آخر که میرسم error میده.