Sent Mail from windows application

windows mail sent from gmail to other mail using windows application.

windows mail sent from gmail to other mail using windows application.

the mail send with attachment also

the mail sent and receive from pop3 and imap. it is enable in gmail account then sent from windows application.

Two thing enable in your gmail setting then pop3/imap tab select enable option.

Then in the form your type your email id and password.whom u send mail that mail id, subject, body if attachment needed to add attachments.

Then send button to click to send the mail


  • Sent Mail from windows application (38439-20329-Form1.cs.txt)
  • Related Articles

    Read Mails from ASP.NET

    This article Illustrate How to read mails from ASP.Net. Using POP commands you can access you email inbox from ASP.Net. Basic POP commands are USER, PASS, LIST, QUIT, RETR.

    SilverPop Integration

    SilverPop is a third party emailing tool which is not only provide the facility to prepare the email templates which needs to be used in sending an email as well as it provides the support for campaign management through various things.

    More articles: Sending Email Email Windows application


    Author: Er. Ram Singh06 Sep 2010 Member Level: Gold   Points : 2

    using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Net.Mail;public partial class Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) {//Calling the function SendMail Response.Write( SendMail("","","","Test Mail","Test Mail Body")); } public string SendMail(string toList, string from, string ccList, string subject, string body) { MailMessage message = new MailMessage(); SmtpClient smtpClient = new SmtpClient(); string msg = string.Empty; try { MailAddress fromAddress = new MailAddress(from); message.From = fromAddress; message.To.Add(toList); if (ccList != null && ccList != string.Empty) message.CC.Add(ccList); message.Subject = subject; message.IsBodyHtml = true; message.Body = body; smtpClient.Host = ""; smtpClient.Port = 25; smtpClient.UseDefaultCredentials = true; smtpClient.Credentials = new System.Net.NetworkCredential("", "password"); smtpClient.Send(message); msg = "Successful"; } catch (Exception ex) { msg = ex.Message; } return msg; }}

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: