string toAddress = [email protected];string subject = "Test Mail with attachment";string body = "Mail with attachment"; MailMessage mail = new MailMessage();SmtpClient SmtpServer = new SmtpClient();mail.To.Add(toAddress);mail.Subject = subject;mail.Body = body;mail.Attachments.Add(new Attachment(strm, "Letter.tif", contentType.ToString()));SmtpServer.EnableSsl = false;SmtpServer.Send(mail);
<system.net><mailSettings><smtp from=[email protected]><network host="xxx.xxx.msft" port="25" userName="kiosk" password="kiosk3417" /></smtp></mailSettings></system.net>