You must Sign In to post a response.
  • Category: .NET

    How to send automatically mail in c#

    i am working on one project ,if vender send mail to list of material i need to when the merchant got mail then he is automatically check the stock and give automatically return back mail to the vender how to do it in C# .net in Desktop Application.
  • #743446

    We have the option in Gmail and Outlook for auto reply. We can set the auto reply mail for particular mail ID. Please try there

    Gopi A.
    +91 9894315571

  • #743607
    Hai Abhijit,
    There are 2 ways to do this:-
    1.Do it at database side
    2.Do it at the application side
    For the first one, you need to write an Inserted trigger so that when the record will be inserted to your table(when vendor send the email with list of material), your trigger should fire and send email.
    For the second one, you need to write the .net code, that should run all the time and check for any new record and if so then send the email to the person.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #744564
    send automatically mail in c# --

    MailMessage mailMsg = new MailMessage();
    MailAddress mailAddress = null;
    mailAddress =new MailAddress((;);

    mailMsg.From = mailAddress;
    mailMsg.Subject = "mail";
    mailMsg.Body = "Tomorrow Meeting";

    SmtpClient smtpClient = new SmtpClient("", Convert.ToInt32(25));
    System.Net.NetworkCredential credentials = new System.Net.NetworkCredential();
    smtpClient.Credentials = credentials;


    Dipti Choudhari

  • Sign In to post your comments