Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6930461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:27:00+00:00 2026-05-27T11:27:00+00:00

How make a sending email from controller? I have email address in database, so

  • 0

How make a sending email from controller? I have email address in database, so I get this email from base and send special text message to this email. I don’t need use a View.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:27:01+00:00Added an answer on May 27, 2026 at 11:27 am

    Here we go:

    Your code:

    System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
    
    message.From = new System.Net.Mail.MailAddress("yourname@yourdomain.com");
    message.To.Add(new System.Net.Mail.MailAddress("receiver@receiverdomain.com"));
    
    message.IsBodyHtml = true;
    message.BodyEncoding = Encoding.UTF8;
    message.Subject = "subject";
    message.Body = "hello receiver";
    
    System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient();
    client.Send(message);
    

    And your web.config:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.net>  
        <mailSettings>
          <smtp from="yourname@yourdomain.com" deliveryMethod="Network">
            <network host="smtp.yourprovider.com" port="587" userName="yourname@yourdomain.com" password="yourpass" enableSsl="true" />
          </smtp>
        </mailSettings>
      </system.net>
     ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently sending text email in PHP and doing something like this: $from
I am trying to send a sample email from my rails application. this is
I'm using System.Net.Mail to send an email message and want to make sure it
My issue is this that I am trying to make use of email sending
As I know the email message sending process looks like this: The message is
Possible Duplicate: Sending HTML email from PHP Using PHP to send an email. I
I'm trying to use the Sending a basic message code from here to send
We've sets of webservices and we have to make request on clientside (sending request
I am sending a meeting invitation as an email with an ICS attachment from
I have gotten quite familiar with django's email sending abilities, but I havn't seen

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.