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

  • SEARCH
  • Home
  • 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 7953399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:08:59+00:00 2026-06-04T03:08:59+00:00

I have web site set up that has some forms authentication through LDAP. I’m

  • 0

I have web site set up that has some forms authentication through LDAP. I’m sending an email when the currently logged in user clicks a button, however the email is being sent from my address, and not the user. This creates a bit of confusion.

What I want to do is send emails using the logged users account without having them enter their user information again.

I basically want to do this:

    MailMessage message = new MailMessage();
    message.From = new MailAddress(User.GetIdentity);
    message.Subject = Subject;
    message.Body = body;
    message.IsBodyHtml = true;
    SmtpClient client = new SmtpClient("address.qweqwe", 25);
    client.Credentials = new System.Net.NetworkCredential(User.Identity);
    client.Send(message);

Getting the users email isn’t a big deal, I’ve already got methods for that, but I’m not sure how I should go about getting their credentials. They’ve already logged on to access the page, and I know they have an LDAP email.

Is there any way to do this without forcing the user to log in again just to send the email?

  • 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-06-04T03:09:02+00:00Added an answer on June 4, 2026 at 3:09 am

    If your SMTP server requires Credentials, I can see 2 solutions.

    1. Ask the user through the page from their Network Credential (username/password)

    2. Setup an account that has right to relay on behalf of all users. This would allow you to set a single account for the SMTP server. Then, every time you send an email all you would do is change the MailMessage.From property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing some work on a web site that has a secure area
I have a website with several forms that all pass the same set of
We have set up a web site for a client who uses Google Apps
I am developing w php web site. Here I have set a php cookie
I'm working on a web site project that is currently tracked in svn but
Like plenty of other people before me, I have some web content that I
I am writing a Asp.net MVC 2 application that uses Forms Authentication and currently
I have a site that is set up to validate the user from time
I have an interesting issue that only happens in IE9. There are some forms
I have a potential client that set up their website and membership system in

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.