use This Code
MyMsg = New MailMessage(StrFrom, StrTo, StrSubject, StrBody);
MyMsg.IsBodyHtml = True;
MySmtp = New SmtpClient("localhost");
MySmtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
MySmtp.Send(MyMsg);
dont use port name or use port 50