SQL Server And Automated Emails

Jul 23, 2005

Hi, folks. I'm fairly new to SQL Server, so forgive any stupidity
inherent in this question. I work at a university and a certain
faculty member would like to have her students create a simple auction
web site as an exercise. As part of the assignment, she wants the
auction site to be able to send an email to a bidder when they have
been outbid.

So she has asked me if this is possible, and how to do it. I've read a
bit about sending an automated email from SQL Server, but I can't find
anything about how to trigger the email based upon a field comparison
in the database. I also don't know how to incorporate a field value as
a variable into the body of the email.

Of course, I don't expect anyone to solve my entire problem in this
forum. I was just hoping that someone could point me in the right
direction. Can anyone give me any advice about where I should be
looking for such info? Can you recommend a web page, or some other
reference material? Is there a specific terminology I should be using
when I search? I just don't seem to be able to find what I need.

Please reply to Join Bytes! -- I don't read newsgroups regularly.
Many thanks in advance!

--Sue

View 3 Replies


ADVERTISEMENT

Sending Automated Sql Emails

Mar 12, 2007

Hi
I am using asp.net framwork 2 with sql 2005 express edition. Can anyone please provide me any sample of sending automated emails (like welcoming people when they register to my website, or if their personal details have been updated....). or any e-book/website ref will do. I am not very expert in sql/db and smtp (or other email) stuffs. So please help me.
With thanks

View 6 Replies View Related

Generating Automated Emails From Birthdays

Mar 14, 2007

Hello,
I just joined the forum and consider myself a SQL beginner. I have installed and supported, run backups and similar, but haven't done much with queries and scripting.

I have a MS SQL 2000 server with a company database on it. Amongst other things, the database contains names, birthdays and e-mail addresses. How difficult would it be to setup an automated query to run every morning comparing birthdays to the current date and send automated e-mails out to matching people saying "Happy birthday ...."?

Thanks in advance,
MrNobody

"If I'm not there, I must be somewhere else"

View 8 Replies View Related

Setting Up SQL Server 2005 To RECIEVE Emails

Jul 16, 2007

Hi there,



I am looking for a way to have SQL server accept incomming e-mails and store the contents of the e-mail into the database. I was doing some research on the subject of recieving emails from a SMTP server with the server having an account, but it looks like there are no information on the subject.



Is this possible? Or do I have to use some sort of work around hack?



Thanks in Advance,

Liv

View 6 Replies View Related

SQL Server Automated Configuration?

May 22, 2008

We have numerous instances of SQL Server 2005 that are being deployed to out enterprise. For each of these instances someone must connect to the server and perform a series of configuration steps in order for things to function correctly for our particular environment. The server OS is Win2003.

I've been tasked to provide a solution to automate this process, it was suggested perhaps that I write some macro or similiar type of script to make this happen. I'm really just looking for some hints as to where I might begin to research this and relaize that I'm trying to do might not be specific to SQL Server but rather more closely related to Windows macros, but thought I would start here in case anyone knows of a different approach specific for SQL Server.

View 5 Replies View Related

Sending Emails Throught DTS Packages In Sql Server 2005

Jan 23, 2007

Hai,
I am working on the DTS Package in SQL Server 2005 , actaully the DTA Packages Use OutLook to Send the email to the Mailing List , now that Out Look Stuff is not working Fine , soo I came to know that we can use Sp_send_dbMail stored Procedure insteds of Outlook , i am trying to do that my Email contains the attaachment to the Text file from the shared Folder.
I am not Getting the Correct Help when i am trying .
So can some one Helpe Providind Some examples and suggetions .

Thanks

View 1 Replies View Related

SQL Server 2008 :: Reminder Emails - Records Created With Status

Jun 29, 2015

We have a difficult requirement.

When records are initially created, they are given statuses of New, Pending, Closed

By default, the status is New.

If no action has been taken after 15 days since the records were created, users are sent a reminder.

I have this part working.

The problem is that as long as the status is not equal to closed, start sending reminders every 10 days.

Here is what I am working with:

SELECT [ID] , [Name], [Email],
Status
FROMmyTable
WHERE Status_Name != 'Closed' AND Status_Name IS NOT NULL and Status_Name = 'New' and Status='Pending'
AND CONVERT(Char,DateAdd(day,-15,getdate()),101) = CONVERT(Char,Date_Entered,101)

View 2 Replies View Related

SQL Server 2008 :: Send Emails To Individuals In Query Results And Extra?

Jul 15, 2015

I have a set of results based on a query that displays a learner, their workplace assessor and both their email addresses.

I want to send a standard request email (using db_mail) to each learner's email address which specifies who their individual assessor is and their current employer. One per learner.
I then want to email each assessor and in this email detail their learners (and their employer details) that I have emailed the request too.

View 1 Replies View Related

SQL Server 2005 Developer Edition Automated Install.

Jul 26, 2006

I am working on a automated install (simulated with a batch file first) and I am having issues when I trying to install SQL2005dev, then SP1 and then the hotfixes. The main issue is SP1 returns to the batch file while it is still running.



Does anyone know how to silently run SP1 and make it wait until after it is installed to continue (on to the hotfixes)?



Example batch file:

"SQLDEVSELSQL Server x86Serverssetup.exe" LOGNAME=C:setupsetup.cab /settings %temp%sqldevsel_1.ini /qb

"sp1SQLServer2005SP1-KB913090-x86-ENU.exe" /quiet /allinstances /norestart

"HotfixesSQL Server x86sql2005-kb918222-x86-enu.exe" /quiet
"HotfixesSQL Server x86as2005-kb918222-x86-enu.exe" /quiet
"HotfixesSQL Server x86dts2005-kb918222-x86-enu.exe" /quiet
"HotfixesSQL Server x86s2005-kb918222-x86-enu.exe" /quiet
"HotfixesSQL Server x86
s2005-kb918222-x86-enu.exe" /quiet
"HotfixesSQL Server x86sqltools2005-kb918222-x86-enu.exe" /quiet

View 4 Replies View Related

SQL Server Admin 2014 :: Assign Timestamp For Automated Backups In Job Schedules

Jul 9, 2015

How would we know to assign the time stamps for automated backups in job schedules....

View 1 Replies View Related

SQL Server 2008 :: 2 Emails Being Send From Job When Only 1 Should Send?

Apr 18, 2012

I have a job that emails out shipment notifications at the end of the day to our customers. The problem I have is I don't understand why the same email is sending out twice within a minute of each other when the job is only scheduled to run once. If I take the code out of the step and run it in management studio it only emails once. I attached the code for one customer for reference. We are running SQL 2008 on a VM sending to an exchange 2010 server.

DECLARE @tableHTML NVARCHAR(MAX) ;
SET @tableHTML =N'<H1>XYZ Company ASN For ' + CONVERT(VARCHAR(10), GETDATE(), 101) + ' </H1>' +
N'<table border="1">' +
N'<tr><th>Vendor</th><th>Delivery Date</th>' +
N'<th>Purchase Order Number</th><th>Item Number</th><th>Item Description</th>' +
N'<th>Quantity Shipped</th><th>UOM</th><th>BOL Number</th>'

[code]....

View 9 Replies View Related

SQL Job Notification Emails

Feb 15, 2008



Hi, looking for some help on job notification emails in SQL 2005.

I've created a backup job in the Maintenance Plan section of SQL2005, and added a "Notify Operator" task to notify me when the job completes.
I've setup Database Mail, and I am getting the notification email whenever I run the job. So this is working fine.

The problem is when I got to the 'Jobs' folder, and into the properties of my backup job, I set it up to notify me from the notifications option, but I am not getting any emails. For now I have set it to notify me when the job "succeeds".

Any ideas why it works from the Maintenance Plan section, but not the "Jobs" notification section? Am I forgetting something?

I have recently migrated a SQL2000 instance to SQL2005, and would now like to setup all the existing jobs to notify me if they fail.

Any advice would be helpful

Thanks

View 1 Replies View Related

Processing Incoming Emails

Sep 14, 2004

How would I go about checking incoming e-mails? For example, on a certain e-mail address, I would get e-mails formatted in a certain way. According to the response, some scripts need to run/ some sql tables updates etc. How can one do this in (ASP) .NET with SQL Server? Anyone did this kind of stuff before?

View 3 Replies View Related

Sending Emails To A Database

Feb 14, 2006

I'm new to programming and to databases so apologies if this sounds like a stupid question.

I have a html page with a simple javascript function that uses the href mailto tag to send an email to a normal email address. I was wondering if it would be posssible to send the email directly to an SQL Server database, without having to pass through an intermediate parsing app. It would mean assigning an email address to the database. Is this possible with SQL Server? I know there would still be problems with parsing the email content to the appropriate fields, but would the sending of the email to the database in itself be possible?

I haven't much experience using databases and I don't currently have access to the SQL Server Express database that will be used to store the email content, so I'm not sure how difficult an operation this would be. I've looked on the internet but I haven't been able to find anything. I was hoping someone here might have done something similar, either with SQL Server or with any other database.

Thanks in advance.

View 2 Replies View Related

Removing Emails From Table

Sep 11, 2014

I'm trying to remove emails from a table but the simple update query I wrote doesn't seem to do it. I figured I'd test one record instead of the entire dbase. I've probably given more info than needed (the select statement) but wanted to give a frame of reference.

SELECT
Name.ID,
EMAIL,
COMPANY,
MEMBER_TYPE
FROM
APSCU_PROD.dbo.Name

[Code] ....

View 9 Replies View Related

Automatic Import Of Emails

Jul 14, 2006

Is there a way to automatically import incoming emails into a SQLServer Database?I know it is inefficient, but we have to run a number of rules on theemail after it is received. Store it in a database and be able toconnect other things, meetings, contacts, etc. Moving it back andforth in chunks can be difficult and the overhead could spiral out ofcontrol.So we were thinking of moving it to the DB as it was retrieved.What do you think would be a better solution to retrieve it?Does my email make sense?

View 2 Replies View Related

Spam Emails From Pinnacle

Jul 20, 2005

Just wondering if there are other people getting mail from Pinnaclesoftware demanding payment of $179 for a subscription that they didn'trequest. I am now on the"Fourth Notice - Invoice past due"I know only one other SQL Server DBA and that person is also gettingthe mail each month. Information on the invoice says the paymentshould be made to Ragan Communication. Is there anyone else out therewho's getting these mails demanding money. I personally find itdisgusting that the company operates in this fashion.

View 1 Replies View Related

Subscription Sends 2 Emails

Jan 23, 2007

We have SQL server 2005 Reporting Services SP1. In Report Manager I have a shared subscription that runs every hour between 8am and 6pm (I created the shared subscription in Report Manager, then modified it in Sql Server Management Studio to run the hours I wanted). I have a second shared schedule that runs Tuesday and Friday at 7am. For 2 separate report subscriptions - one uses the hourly schedule and the other uses the 2-day schedule, the first time they run during the day it sends 2 email - after that it sends only 1 email, as it should. I created a subscription to email a report when the report content is refreshed from a report snapshot. In Properties...Execution, I selected to render this report from a report execution snapshot, and selected my shared schedule. For the History property I have selected Allow report history to be created manually and Store all report execution snapshots in history; I am not using a schedule to add snapshots to report history in the History property.

When I look at the job in Sql Server Management Studio, it has only ran once each hour. When I look at the snapshot history, there is only one record for each hour. Why is the first scheduled instance sent twice instead of once?

View 8 Replies View Related

Auto Reminder Emails?

Mar 30, 2007

I don't know much about broker service so I have question. We have a content management system the we developed locally, and what we have are catagories and subcatagries. When people choose a topic we send them an email about the topic they are interested in. We are now selling webinars and white papers and articles on demand. We would like to be able to send a reminder email to anyone who signed up for a webinar or special event. Is this possible with broker service?

View 4 Replies View Related

Error In Sending Emails

Apr 23, 2007

Hi,

i am getting the following error when i try to schedule a report and Delivery it through an email

"The e-mail address of one or more recipients is not valid"



although, i have mentioned my pop3 mail account, i have included the smtp server details in the .config files as per the msdn help.



pl help me solve this



T & R,

Bharath V V

View 3 Replies View Related

Stored Procedure That Emails In HTML

Aug 28, 2006

I presently have a Access macro that emails conditionals in a report to users in web format HTML. I would like to turn that into a stored procedure, but having some difficutly can anyone out there assit me please??

View 1 Replies View Related

T-SQL (SS2K8) :: Sending Multiple Emails

Oct 9, 2014

I need to send multiple emails to recipients one at a time what is the best way to do this?for example i do a select statement to get 5 email addresses, now i need to be able to fire off an email with verbiage to each one of them separately. The reason they have to be separate is in the verbiage i need to have there name in the 'Dear Jondoe1,' Here is my second dilemma. How would you insert a name in the verbiage for each email?

jondoe1@gmail.com
jondoe2@gmail.com
jondoe3@gmail.com
jondoe4@gmail.com
jondoe5@gmail.com

View 2 Replies View Related

Can We Read Emails From MS Outlook Inbox?

Apr 25, 2008

Not sure if this is possible, I have a requirement, when email comes into our MS outlook Inbox, we need to identify the email based on the From email address and read the data which is in the body of the email. I do'nt know if we can do something like that using SQL 2005, any ideas?? Thanks!!

View 1 Replies View Related

Using A Loop To Create A List Of Emails

May 29, 2008

I have a stored proc I am running, and I would like to create a list of email addresses from a table and put that list into a variable. I did a basic while loop to work on syntax, but now I don't know how to actually get each address added on. Here's how I started it

declare @start int, @testEmail nvarchar(2000)

set @start = 1
set @testEmail = NULL
while @start <= (Select count(PADM_Email) from PADM_Emails)
Begin
--Print @start
set @testEmail = @testEmail + (Select distinct PADM_Email from PADM_Emails) + ';'
set @start = @start + 1
End

I know that the above is wrong, but I don't know how to get it right. Ideally, I want the @testEmail to look like this:

emailaddress1;emailaddress2;emailaddress3;

View 7 Replies View Related

CR/LF In Comment Field In Emails Sent Using DataDrivenSubscriptions

Mar 15, 2007

I am setting up a data driven subscription to send out an email which includes a report. The Sql for the data driven subscription outputs the EmailTo, Subject, Comment(Body) and some report parameters. My issue is with the Comment (Body) field which I would like to format with CR/LF to make the email body look neat and readable. I've tried many different permutations of inserting the CR/LF, From concatenating Char(13) + Char(10) in which the email does recognize the Cr/LF to concatenating binary 0x0D + 0x0A which after the first concatenation of binary nothing else can be concatenated. Here is the code I've tried:
---~~~~~~~~
declare @iEndDate datetime
set @iEndDate = dbo.fn_today()
Declare @Account_group int
Set @Account_group = 999
/*
DECLARE @mybin1 binary(5), @mybin2 binary(5)
SET @mybin1 = 0x0D
SET @mybin2 = 0x0A
*/
Declare @CrLf VarChar(5)
set @CrLf = CHAR(13) + CHAR(10)
Declare @Str1 VarChar(255)
Declare @Str2 VarChar(255)
Declare @Str3 VarChar(255)
Declare @Str4 VarChar(255)
Declare @Str5 VarChar(255)
Declare @Str6 VarChar(255)
Declare @Str7 VarChar(255)
Declare @Str8 VarChar(255)
Declare @Str9 VarChar(255)
Set @Str1 = 'Good Morning,'
Set @Str2 = 'We are exposed by '
Set @Str3 = 'Attached please find the margin call detail.'
Set @Str4 = 'Please let us know if you have any questions.'
Set @Str5 = 'Thank you.'
Set @Str6 = 'Please respond to:'
Set @Str7 = ''
Set @Str8 = ''
Set @Str9 = ''
declare @t table
(
EmailTo VarChar(255),
ReplyTo VarChar(255),
Subject VarChar(255),
Comment Text,
Account_group Int,
Trading_Account_Id Int,
Broker_Code_Ky VarChar(255),
EndDate Datetime
)
insert into @t
select
EmailTo = '', -- isnull(bf.firm_email,''),
ReplyTo = '',
Subject = 'Margin Call Notice: - ' + Trading_account_name + ' - Exposure: ' + '$' + Convert(varchar(20), convert(Money, Mark_amount),1) ,
Comment = @Str1 + @CrLf + @CrLf + @Str2 + '$' + Convert(varchar(20), convert(Money, Mark_amount),1) + '.' + @CrLf + @CrLf + @Str3 + @CrLf + @CrLf + @Str4 + @CrLf + @CrLf + @Str5 + @CrLf + @CrLf + @Str6 + @CrLf + @Str7+ @CrLf + @Str8 + @CrLf + @Str9,
Account_group = @Account_group,
Trading_Account_Id = trading_account_Id,
Broker_Code_Ky = EGS.Broker_Code_Ky,
EndDate = @iEndDate
from fni_ExposureGovernmentSummary (@iEndDate) EGS
join broker_group bg
on EGS.broker_code_ky = bg.broker_code_ky
Join broker_firm bf
on bg.fbe_firm_id = bf.broker_firm_id
Order by
Broker_Group_Name,
Trading_account_Name
select top 2 * from @t

--~~~~~~~~~~~~~

The Email my company is using is Lotus Notes.

The Question is how do I code the the Comment field so that my email will recognize the Cr/LF.

Thanks

Elias

View 2 Replies View Related

Broken Links In Subscription Emails

Nov 2, 2007

Hi everyone,

Is there somewhere that I can change the links that are included in subscription emails? The link that goes out is incorrect because the port number of the server is not included in the link, so I'd like to edit this. Does anyone know where this can be done? Thank you!

-Keith

View 1 Replies View Related

All Emails Received As Junk Or Spam Folder

Mar 30, 2012

I developed a mass mailing tools, but all mails received in junk and spam folder

I use an store procedure 'sp_send_dbmail' which is by default in sql server, when i send an testing mail using object explorer ->Database mail -> right click -> send testing mails, then this mail received in inbox, but when i call 'sp_send_dbmail' this procedure using job with 2 min intervals then mails received in junk or spam folder of recipients..

I configured correctly all information of smtp details ip address...

Why mails r received as junk or spam folder ??

View 2 Replies View Related

All Emails Received As Junk Or Spam Folder?

Apr 18, 2012

i got stuck, while sending emails using store procedure sp_send_dbmail, when i m sending simple text format then mail received in inbox but whenever i m trying to send an html format emails with links of images and href tags mails received in spam.. i store procedure is given below..

DECLARE @tableHTML varchar ;
SET @tableHTML =
'<table border="1" >
<tr>
<td width="187"><a href="http://printbooth.in/product-list.php?cat_id=16&subcat_id=265" target="_blank"><img

[code]...

View 1 Replies View Related

Decipher - Input Keyword / Order Emails

Jun 10, 2015

I am just trying to decipher this sql and the only thing I do not understand what is going on here is what the "input" key word is doing below. I believe its loading all of the select into the table ##OrderEmails, what is it doing?

Code:
SELECT
LEFT(OAORDT,4) + '-' + SUBSTRING(RTRIM(OAORDT),5,2) +'-' + RIGHT(OAORDT,2) "Date",
OACONO Company,
OADIVI Division,
COUNT(DISTINCT oaorno) "# Orders"
--/*OAORST + '/' +*/ OAORSL "Order Status"
INTO ##OrderEmails

[Code] ...

View 3 Replies View Related

Column Size In Emails Generated Using XP Sendmail

Dec 14, 2007

Hi, with some help today I was able to get my stored procedure runningand have the results emailed to me. However, this is how its showingup:Accounting_Year WK_IN_FYEAR LocationGL_AccountCol Data Difference--------------- ----------- ------------------------------------------------------------------ -------------------- --------------------2007 49 Test1500-001-2587872.0200 -2587872.0200 .00002007 49 Test2500-001-3344713.5000 -3344713.5000 .00002007 49 Test3500-001Is there anyway to line them up side by side properly? When i have twocolms selected the format comes out ok. Thanks for all the helpagain!Here is the sp:CREATE PROCEDURE [dbo].[spEmailVariance](@SubjectLine as varchar(500),@EmailRecipient VARCHAR(100))ASDECLARE @strBody varchar(5000)set @SubjectLine = 'Weekly Flash Update'SET @strBody ='Select statement'exec master.dbo.xp_sendmail@recipients= 'XX@XXXX.com',@subject= @SubjectLine,@query = @strbodyRETURNGO

View 2 Replies View Related

Sql Reporting Services - Subscription To External Emails - Help

Sep 21, 2007

Hi
I have report subscription to send mail to external emails.
It works fine for Internal email id's, external email id's doesn't work.
Any body knows what configuration changes we need to do.
Please let me know if any body knows.
Thx
vijji

View 4 Replies View Related

Creating A Trigger That Emails When New Record Is Added.

May 21, 2007

I'm hoping one of you will be able to help me because I haven't had very good luck finding any information on this.



I'm kind of new to SQL, but I'm learning as much as I can.



I created a web form that sends a new record to a SQL 2005 table I setup.



This all works exactly as it should, but I would like to have an email sent out every time a record is added to this table.



I have SQL Mail setup and I ran a test and it worked, but I can't seem to find any info on how to create a trigger that will send an email to me when a new record is added to the table.



My Database is called Engineering

The table is called ESSPartNumLog



And I have the following Columns that I would like to send in my email..



ESSSequence (PK,int, not null)

MaterialType (nvarchar(255, null)

ESSPrefix (nvarchar(255, null)

PartDescription (nvarchar(255, null)

Project (nvarchar(255, null)

PM (nvarchar(255, null)



Any ideas, or can you point me in the right direction?

View 1 Replies View Related

Integration Services :: Sending Emails By Looping

Sep 8, 2015

First of all, I am very new to SSIS. I came across a requirement that I need create files and send emails, I have done experiments on these two individually. But together this is what I need to do and create a package that does all..
 
From the result of a SQL query above, in a location create excel files Administration.xlsx, Cafeteria.xlsx, Front Office.xlsx that has their own data rows, then email those files to the appropriate employee. Person1 and person2 will receive Administration.xlsx, manager will receive Cafeteria.Xlsx and sec will receive Front Office.xlsx.

Is it possible to create a dtsx package that does them all?

View 11 Replies View Related







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