www.webdeveloper.com
Results 1 to 3 of 3

Thread: How can you send an email message from an ASP.NET Web page?

  1. #1
    Join Date
    Jul 2013
    Posts
    45

    How can you send an email message from an ASP.NET Web page?

    Hi,
    I want an application on Asp.Net, In this i want to send email with my application, So tell me how i can send an email.

  2. #2
    Join Date
    Jun 2013
    Location
    Dubai
    Posts
    73
    If you are still here

    You can very easily send an email from ASP.NET
    System.Web.Mail namespace is the first thing you need:
    <%@ Import Namespace="System.Web.Mail" %>
    While you send an email it requires the following points as sender, recipient, subject and body going under SmtpMail.Send().
    And here is an examples:
    string from = "sender@example.com";
    string to = "recipient@example.com";
    string subject = "Good day!";
    string body = "Any news?";
    SmtpMail.SmtpServer = "mail.example.com";
    SmtpMail.Send(from, to, subject, body);

    The SmtpMail.SmtpServer means that you are to specify the mail server that used to deliver the message.

  3. #3
    Join Date
    Jul 2013
    Posts
    45
    Thanks for your information.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles