SQL Server :: Send Automatic Email To Customers?

Sep 7, 2010

I need to write a stored procedure to schedule a job that will send automatic email to customers based on some condition as follows:

1. I have two tables. One table is table1 like the following:

Name Date1 Date2 Date3 Rahim, Khan 29'10 30'11 25'08 Karim,Abedin 12'10 28'11 26'09 Fahad, Alam 26'10 12'11 25'10 Another Table is table 2 like the following:

Name Email Rahim,Khan rahim@yahoo.com Karim,Abedin karim@yahoo.com Fahad, Alam falam@yahoo.com In table 1 the date format is in format where 30'11 mean work week is 30 and 11 means last two digits of the year.

2. Now , I need to write a stored procedure that will check :

a) What is current work week and current year?

b) It will then determine the difference between the current work week (now 37) and work week mentioned in date (Date1, Date2 and Date3) columns from table1 and if for current year(it's 2010) at least one difference in each row is>=8 then it should send an automatic email to the corresponding email address of Name column using the relation between Table1 and table2. For example: For first record in Table1 the three difference is: 37-29=8, 37-30=7 and 37-25=12. There are two differences >=8, but only first difference is for year 2010 and third one is not for current year. But, since at least one difference in this row satisfies condition (That means >=8 for year 2010)hence email message should be sent to the address rahim@yahoo.com using relation of table1 and table2.

I know how to set a schedule job in SQL mail but I need this stored procedure to run this job on daily basis.

View 8 Replies


Similar Messages:

Web Forms :: Automatic Email Send In Application

Feb 18, 2014

I have a requirement like, I need to send an emails to all clients at 9:00 pm every day. I have the code for email send. I just want to know how do we schedule program to run at certain time in asp.net application. Do we need to open that website all the time ?

View 1 Replies

Architecture :: How To Send Automatic Email On Daily And Weekly Bases

Feb 13, 2010

I have a web site in asp.net(C#). And want to add an automatic email sending functionality in it, i.e. an email will be send daily and weekly(both on a particular time) to all the stock holders about the orders details placed by registered users. How can I do this in asp.net(C#)?

View 21 Replies

DataSource Controls :: Send An Automatic Email To A Certain User Through Sql Express?

Mar 21, 2010

is it possible to send an automatic email to a certain user through sql express? im using sql express to handle my auction so i need to email the winner when endate =Now.

View 1 Replies

Architecture :: Need To Find A Way To Send An Automatic Email To Each Employee When The Current Date Exceeds The Subscription Date By One Year?

Jun 7, 2010

I'm using ASP.Net with VB (Visual Web Developer 2010) and SQL(Management Studio Express 2008) to create a website that keeps track of employee subscriptions.A date is entered into my database whenever an employee makes a subscription.I need to find a way to send an automatic email to each employee when the current date exceeds the subscription date by one year.

I am unable to use an SQL job as I only have SQL MS express.From other posts I have read it seems the best way to do this is to create a webservice to send emails but I am unsure of how to get the email address for each employee from the database to the web service?Do you guys think a web service is the best way to do this?

View 9 Replies

Web Forms :: How To End Email To All The Customers In Which Plan Is Going To Be Expired In One Week

Dec 1, 2010

In My application , i have different plans1)Free2)Personal(Monthly, Yearly)Now my problem is 1)Want to send email to all the customers in which plan is going to be expired in one week , on the day of expiration andafter expiration to re2)After expiration i have to set the record status to deactive

View 3 Replies

How To Send Email Without Smtp Server

May 11, 2010

I want to send email without declare username and password in smtp server. I am using asp.net c#, this is possible in asp below is the code , anybody tell me how can i use this code in asp.net.

<%
Dim ObjSendMail
Dim iConf
Dim Flds
Set ObjSendMail = Server.CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")....

View 5 Replies

Use SQL SERVER Trigger To Send Email In C#?

Jan 23, 2010

I am building service failure notification system which notifies customers and management whenever there is a delay in the service. How can I use SQL SERVER trigger to send an email to a group of people when I add an alert in the alert database table using c#.

View 3 Replies

Send Email Using Godaddy Server

Oct 28, 2010

I try to use smtp relay-hosting [URL] and [URL] but both are not work fine in my vb.net site..

View 3 Replies

DataSource Controls :: Select All The Customers From "customers" Table From A Specific Country - Query Is Not Working

Feb 23, 2010

I want to select all the customers from "customers" table from a specific country. I write the following query but it is not working. why?

select *
From customers
where country = @country;[code]....

View 1 Replies

Use A Queue To Send Email To An Smtp Server?

Dec 9, 2010

module thats available for asp.net that uses a queue to send email to an smtp server? the queue being the operative word here.. we need a proper fallback mechanism for storing any messages that can't be sent so that the send can be re-attempted later

View 1 Replies

Web Forms :: Email Doesn't Send On New Server

Jul 16, 2010

I have been using a C# asp.net email form for a while on an old server (administered by a friend who has moved away) and now I have my own server. The problem is the form appears to send but the message never turns up in the mail box. Because the form used to work, I suspect its my server settings. The code behind for the form is:

[Code]....

I have set the web site up as ASP.NET and the pages load ok etc. So I go to the form, fill it out and it is processed and I get the confirm message. What do I need to check at the server end? Sorry if its a dumb question I am quite new to the finer points of server management

View 6 Replies

How To Send Email From Local Host On Server

Jan 13, 2011

I am using gmail smtp server and email account to send email from my asp.net site. It works fine when I use it on some hosing server but it is strange it do not work on local machine. Plz guide me what should I do ? Do I need to install some smtp server (if yes plz mention the name as I am not aware of it) .

View 14 Replies

Send Email From A Win2008 Dedicated Server?

Oct 24, 2010

I know how to send email from asp.net using my pc and my provider smtp server. But doing the same thing from a Win2008 dedicated server is confusing for me. I have installed the smtp server and configure for my virtual web as explained here :

[URL]

But I'm confused by these two lines

serv.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
serv.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["SmtpServerUserName"], ConfigurationManager.AppSettings["SmtpServerPassword"]);

1°) Why PickupDirectoryFromIis since in configuration localhost smtp server has been chosen and not pickup directory ?

2°) When setting up the smtp server no login / password has been asked so is the same as the computer login / password ?

View 2 Replies

Configuration :: Way To Configure The Server To Send An Email

Mar 28, 2011

is there a way to configure the server / something else to send me an email every time asp.net crashes (with the error - just like the "yellow" screen it shows)

View 3 Replies

Web Forms :: Send Email Using SMTP Server?

Nov 21, 2011

I want to send emails using SMTP server in ASP.Net. I amusing C#

View 1 Replies

IIS Configuration :: How To Send Email From Domain Server

May 11, 2013

I have read several articles to send emails in Asp.net C# major are by using Gmail, I want to send email from a email id from mydomain name.The code that I am using is:

The code works properly would like to know whether the code is correct as I have have tested it by sending mails to gmail and rediffmail, it works properly, would also like to know the reason for using client.Port = 25;

MailMessage Msg = new MailMessage();
Msg.From = new MailAddress("sales@mydomain.com", "Testing");
Msg.To.Add(TxtEmail.Text);
Msg.Subject = "Send Mail with HTML File";
Msg.Body = "Checking";

[Code] .....

View 1 Replies

Web Forms :: How To Send Email Through SMTP On Server 2008

Sep 1, 2010

I have the following form and trying to click a button and email through an SMTP server.

[Code]....

Code behind:

[Code]....

Web.config file:

[Code]....

View 9 Replies

How To Send Email From An App Using Free GMAIL SMTP Server

Mar 15, 2010

I have configured gmail's free smtp server for my web app and previously I was using smtp server configured at the server.

So I have changed my smtp settings accordingly but my app isn't sending any email and giving me error connection time out, third party tool isn't responding after many retrials.

Here are my settings-

SmtpClient smtpClient = new SmtpClient("mail.MyWebsiteDomainName.com", 25);
smtpClient.Credentials = new System.Net.NetworkCredential("info@MyWebsiteDomainName.com", "myIDPassword");
smtpClient.UseDefaultCredentials = true;....

View 8 Replies

How To Send Email From An EC2 Instance Using GoDaddy's SMTP Server

May 27, 2010

SMTP is a whole new ballgame for me, but I am reading up on it.

I am attempting to send email from my EC2 instance using GoDaddy's SMTP server. My domain name is registered through GoDaddy and I have 2 email accounts with them.

I can successfully send the email from my dev box no problem.

my web.config

[code]....

I have a feeling I'm just missing something fundamental. I also have a feeling someone is going to recommend I use AuthSmtp or something similar, I'll agree, and have had wasted the past 6 hours

View 2 Replies

Configuration :: Can Send Email From Webpage On Godaddy Server

Aug 22, 2010

my problem that i have 2 website on godaddy and i need to creat a web form for feedback just fill some fileds and send it by email message.

i tray several ways in code but no one work if there is any one have a website on godaddy and have a web form to send e-mail explain to me or put your code

View 2 Replies

Web Forms :: How To Send Email Without Mail Server And Domain Name

Apr 20, 2010

I am developing an web application using VB.NET in which user have to confirm the email address they provide to activate the account, in short I have to send an email for activating there account. I am all set with the logic and codes, the only trouble is I just realise that i need a mail server and domain to be able to send email.

To be honest with you all i need now is something to try if the application is working and obviously for demo. I havent got any domain yet and no intention of buying one.

View 2 Replies

SQL Server :: Send Storedprocedure Results As Email Body

Mar 2, 2011

I have 3 procedures.

1. SP_General - Gives the output with 3 columns like: ID NAME DOB with multiple rows

2. SP_HTML - Gives the HTML formatted output like: <table><tr><td>ID</td><td>NAME</td><td>DOB</td></tr></table>

3. SP_Email - Sends email (written by using extended stored procedures). Input parameters: Body, etc

When I DO:

1. EXEC SP_Email @Body = 'Hello this is testing'. I recieve the email saying: Hello this is testing

2. EXEC @Results = SP_General

EXEC SP_Email @Body = @Results. I recieve the email saying: 0

3. SELECT @Results = EXEC SP_HTML

EXEC SP_Email @Body = @Results. I recieve the email saying: 0

4. SELECT @Results = '<table><tr><td>ID</td><td>NAME</td><td>DOB</td></tr></table>' (If hardcoded like this)

EXEC SP_Email @Body = @Results. I recieve the email with correct output in a nice formatted table: ID NAME DOB

Its working in 1 and 4 cases but not 2 and 3. As I cannot hardcode like that, can anyone tell me where I'm doing mistake in 2 or 3 cases?

View 11 Replies

How To Send An Email Using Authenticate Smtp Server With Port Number

Jan 7, 2010

i want to send an email using authenticate smtp server with port number(For Example SMTP Server is :

192.168.0.8 and port : 587).

i got lots of example but failed to find smtp server with port number using authentication.

View 4 Replies

How To Send Email From Server To Home Network Clients (via Outlook)

Apr 9, 2010

I'm a newbie in asp.net (and vb.net)..

I have an application which will sent an automatic email from my company mail server to all the client/employee in my company every week. how to make this happen... everytime i applied the codes that i'm searching in google always give me some errors cause it always discuss how to send email to outside the company...

How can i achieve this goal ? what codes should i use ?

Note : i'm using vb.net 2005 and microsoft office outlook

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved