Quote:1. start->administrative tools->server manager, go to features, select "add features", tick "smtp server" (if it is not already installed), choose to install the required "remote server admin toos" 2. check to confirm that "Simple Mail Transfer Protocol (SMTP)" service is running, if so, we are good to go. 3. start->administrative tools>internet info services(iis) 6.0 4. make sure that SMTP virtual server/default smtp server is running, if not, right click, then choose "start" 5. in IIS7, go to website/virtual directory, double click "SMTP E-mail", Click on "Deliver e-mail to SMTP server", check the "Use localhost" checkmark 6.Your code should be LIKE: SmtpClient serv = new SmtpClient(); MailMessage msg = new MailMessage(); msg.To.Add("toadrr@domain.com); msg.Body = "body"; msg.Subject = "subj"; msg.BodyEncoding = System.Text.Encoding.ASCII; msg.IsBodyHtml = isHTML; serv.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; serv.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["SmtpServerUserName"], ConfigurationManager.AppSettings["SmtpServerPassword"]); serv.Send(msg); --->My app is now sending emails. The first email spent about 30 min in the Queue folder, but after that, each email is sent straight away. (this is working for testing purposes, i am not sure if i should use this setup in a production environment - please advise)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)