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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:56:01+00:00 2026-05-23T04:56:01+00:00

For an application I need to send personalized invitation emails to end-users every hour.

  • 0

For an application I need to send personalized invitation emails to end-users every hour. Those users email-addresses, and the rest of their information are in the database.

  • All users that have a bit
    Planned.IsPlannable set to True and
    have a Planned.DateStart and a
    Planned.DateEnd between a certain
    period are available for receiving an
    email message.
  • There are about 350 messages to sent every hour.
  • All information that
    must be included in the message is
    from the Database.
  • The application is
    a .NET4.0 Console application, for data
    access I use Subsonic3.0.

There are at least two scenarios to choose from: retrieving the appropriate data via a

1:) View something like:

SELECT    [Computer].ComputerName, 
          [User].UserEmail, 
          [Planned].DateAvailable, 
          [Planned].DatePlanned
FROM      [Computer] 
INNER JOIN
          [Planned] ON [Computer.ComputerID] = [Planned.ComputerID] 
INNER JOIN
          [User] ON [Computer].UserID = [User].UserID
WHERE     (DATEDIFF(dd, GETDATE(), [Planned.DateAvailable]) < 10) 
          AND Planned.IsPlannable = 1

and compose, based on the results of this view, the appropriate messages in the C# code of this application.

graph of the structure

2:) Compose the entire message on the sql-server in the view and return something like

[EmailTo]
[Subject]
[Body]

Then only iterate trough the results and create MailMessage Objects from it

in both cases I get the messages like:

foreach (vwGetInvitableComputer u in UserController.GetAllInvitableUsers())
{
    // where the usercontroller wraps the Subsonic logic.
    // the composition happens here
}

Iterate trough that in the C# code and just compose the mailmessage from that preformatted data.

What scenario is performance and resources wise to choose?

update: There is indeed text manipulation in the database in option 2. However, this is replacing three strings in the messagbody to the CompterName, DateStart and DateEnd.Perhaps, SQL-views are smart enough to spread the performance for this, while the c# code does it “when requested”?

  • 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-23T04:56:02+00:00Added an answer on May 23, 2026 at 4:56 am

    First consideration: Can you envision a time when changing the emails format will become necessary? If not then it probably doesn’t matter.

    Second consideration: Can you envision a time when the emails will require more manipulation than SQL is easily capable of delivering? If so then you definitely should choose C#.

    Third consideration: How problematic would a redeploy be for the environment?

    And finally an alternative option: Use C# for the message composition, but use a database or file based Template that can easily be updated.

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

Sidebar

Related Questions

I need to send emails from my web application (on account creation, password reset,
I need to send emails to a list of IDs from the contact application,
I am building an application that will need to send emails on numerous occasions
I need to send email notifications in my Java web application. I'm using Apache
I need to send a number of emails out from my RoR application, and
In my java application I need to send mails to different mail addresses. I
I need to send a email from application with text in the from field.
I have web application (asp.net) located on web server. I need to send email
I have an application in which I need to send an email which contains
i'm working on an iphone app, in which i need to send application request(invitation

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.