Md Shah
asked on
C#: Check emails and perform SQL operations
Hello Experts,
I am performing some manual repeated operations in my project and I am planning to make it automatic by creating a tool or program which will remove my extra burden.
I will be receiving emails from client example Check Balance of Clients Account. After receiving such email, I need to run respective SQL query which will provide a set of 10 records as a result. Then I need to export this result in CSV format or excel and save it in my desktop. Then I will reply to client's email which I have received with fixed content in it and will be adding this exported excel doc to this email and will be sending it to the client.
Manual Operations:
Step 1: Open my email account and check for new email with subject as something like 'Check Balance'
Step 2: Note down the Account Number present in the body of the email
Step 3: Get the corresponding SQL query which is present as text file in my local machine.
Step 4: Run this SQL Query by replacing the Account Number at sufficient locations in SQL Server.
Step 5: Export the resultant SQL output to excel file.
Step 6: Attach this excel file to clients reply email.
Step 7: Copy the body content present in text file present in my machine.
Step 8: Send the email to client.
I do not know if I can achieve above all 8 Steps automatically through C# code but I want to cover as many Steps I can to automatic so that it will save my time.
I will be grateful if experts can help me out here with this...
Thanks in Advance...!!
I am performing some manual repeated operations in my project and I am planning to make it automatic by creating a tool or program which will remove my extra burden.
I will be receiving emails from client example Check Balance of Clients Account. After receiving such email, I need to run respective SQL query which will provide a set of 10 records as a result. Then I need to export this result in CSV format or excel and save it in my desktop. Then I will reply to client's email which I have received with fixed content in it and will be adding this exported excel doc to this email and will be sending it to the client.
Manual Operations:
Step 1: Open my email account and check for new email with subject as something like 'Check Balance'
Step 2: Note down the Account Number present in the body of the email
Step 3: Get the corresponding SQL query which is present as text file in my local machine.
Step 4: Run this SQL Query by replacing the Account Number at sufficient locations in SQL Server.
Step 5: Export the resultant SQL output to excel file.
Step 6: Attach this excel file to clients reply email.
Step 7: Copy the body content present in text file present in my machine.
Step 8: Send the email to client.
I do not know if I can achieve above all 8 Steps automatically through C# code but I want to cover as many Steps I can to automatic so that it will save my time.
I will be grateful if experts can help me out here with this...
Thanks in Advance...!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Astoutkarsh for your response, it will help me for initial start...
Also I agree with Éric Moreau as this is huge stuff, let me break down into smaller tasks..
Yes I am a C# developer and I know how to interact with SQL Server via ADO.NET and fetch the resultant output into data-table.
Question 1) Now I do not know how to covert this resultant output into .csv or .xlsx sheet..
http://www.experts-exchang e.com/Prog ramming/La nguages/C_ Sharp/Q_28 416910.htm l
Question 2) I do not know how to check NEW emails in my account like GMAIL or YAHOO so..
https://www.experts-exchange.com/questions/28416918/Perform-email-operations-by-C-code.html
Question 3) I have never worked on Windows Service. I want to learn it how to create Windows Service project and how to host this service in my local
http://www.experts-exchang e.com/Prog ramming/La nguages/C_ Sharp/Q_28 416928.htm l
I have created 3 different Questions for this task as I believe 500 points for this solution is not sufficient, so lets make it 1500 points for this task
I will be closing this Question once above 3 Questions are resolved.
Cheers..
Also I agree with Éric Moreau as this is huge stuff, let me break down into smaller tasks..
Yes I am a C# developer and I know how to interact with SQL Server via ADO.NET and fetch the resultant output into data-table.
Question 1) Now I do not know how to covert this resultant output into .csv or .xlsx sheet..
http://www.experts-exchang
Question 2) I do not know how to check NEW emails in my account like GMAIL or YAHOO so..
https://www.experts-exchange.com/questions/28416918/Perform-email-operations-by-C-code.html
Question 3) I have never worked on Windows Service. I want to learn it how to create Windows Service project and how to host this service in my local
http://www.experts-exchang
I have created 3 different Questions for this task as I believe 500 points for this solution is not sufficient, so lets make it 1500 points for this task
I will be closing this Question once above 3 Questions are resolved.
Cheers..
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for mdshahbrains's comment #a40013165
Assisted answer: 250 points for astroutkarsh's comment #a40012530
Assisted answer: 250 points for astroutkarsh's comment #a40014126
for the following reason:
Thanks for the info !!
Accepted answer: 0 points for mdshahbrains's comment #a40013165
Assisted answer: 250 points for astroutkarsh's comment #a40012530
Assisted answer: 250 points for astroutkarsh's comment #a40014126
for the following reason:
Thanks for the info !!
ASKER
Done
you need to write some code and ask specific questions about particular steps.
if you are not a programmer, consider hiring one or use some service like rentacoder to provide you a full solution