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 6224931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:45:12+00:00 2026-05-24T08:45:12+00:00

I have a site that gets a user to approve another users access to

  • 0

I have a site that gets a user to approve another users access to something.. What I want to do is send off an email to that user, when their access has been approved.

Each access item is in a gridview, with an approve button that someone clicks.

The issue is that I don’t want 10 emails to be sent to the user if they have 10 approvals to be done.
I want just one email to be sent.

This somehow requires the email procedure to be delayed, and grouped..

Does anyone know a nice and simple way of doing this?

  • 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-24T08:45:13+00:00Added an answer on May 24, 2026 at 8:45 am

    There’s 2 simple ways I can think of here:

    1. Don’t send emails when the user clicks, and instead send 1 email every 30 minutes or so. This would require some sort of script which runs every 30 minutes to check what emails need to be sent, which then goes out and sends the emails. This would probably be the best way to do this, but a bit harder. You can extend this a little if your script runs regularly (every minute or so) to only email users which have been inactive, if you really want to avoid sending multiple emails.

    2. Batch the emails up so that when the amount of stored emails reaches (e.g.) 10 emails for a user, then all the emails for that user are sent. This has the potential major downside (depending on your expected usage) that some emails may be massively delayed or not sent at all (if a user is only ever asked to approve 1 thing), so you really shouldn’t do this unless you are 100% certain this will never happen (e.g. all users asked to approve at least 10 items per day), and even then I’d recommend not doing this.

    Regardless of which way you pick, you’re going to need to store which emails still need to be sent in some way, and I can’t really give much advice here because I’m not sure of the specifics of your setup.

    Update: Since you’re using c#, you’ll have a database (e.g. Microsoft SQL Server) backing your website, and probably a table for users. I’ll assume it’s called Users and has an id column as its primary key, and an email column which records the current email address for that user:

    1. Create a Emails table which has columns of id (primary key), user_id (foreign key representing the user entry in the users table) and email_text (the text of the emails you want to send).

    2. Each time you would normally send an email, instead add a record to the Emails table, with the user_id pointing to the correct record in your Users table.

    3. Write a separate C# (or other language) application/script which does the following:

      1. Get 1 record from the Emails table, and its corresponding user entry, using something like:

        SELECT users.email, emails.email_text FROM users, emails WHERE user.id = email.user_id LIMIT 1; (I don’t have a SQL server handy to test, so adjust syntax as required)

      2. Send the email based on the information you pulled from the database

      3. Delete the record from the Emails table

      4. If you have more email to send, go back to (sub) step 1.

    4. Set up a scheduled task (or Cron task, if anyone’s trying to apply this to a non-windows deployment) which runs your C# application (or whatever language you chose) every 30 minutes.

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

Sidebar

Related Questions

I have a site that gets most of it's traffic (like 90%) from users
I have a public facing hobby site that gets about 3000 unique visitors a
I have a site that uses forms and validates fields and redirects to another
We have a site where the user gets a navigation bar to allow navigation
I have a menu on my site that changes depending on whether the user
I am making a social networking site where I want to have a user's
Let's pretend that I have a site where the users create topics and write
I have a site that requires Windows Authentication the application obtains the credential from
I have a site that is using x509 client certificates (2 way SSL) to
I have a site that usually has news items at the top of the

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.