I have about 150 people I would like to send e-mail automatically. Each
person would get a unique form letter that includes username and
password I have stored in a SQL table. Is this possible? Help
appreciated. Thanks.
Frank
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
I was wondering if anyone has extended the standard CDOSYS Mail Stored Procedure (SP) to allow it to send the results of a query as an attachment?
I have set up a SP for CDOSYS Mail as outlined in the following link: http://support.microsoft.com/default.aspx?id=kb;de;312839&sd=tech
Currently I am using the old SQL Mail (xp_SendMail). But due to the problems with losing the MAPI connection and other limitations, I have been forced to find another solution. Using SQL Mail, I was able to add a query parameter and attach the results of the query to the email. I need to have the same functionality in CDOSYS Mail
Hi: I have SQL Server 2005 Express edition and I am trying to generate a script that someone can take and import into the full version of SQL Server. Using the Generate Scripts Option, I have been able to generate scripts for the various SQL statements that I created - but cannot get it so that the data is included. I'm new to this and would appreciate any help. I have a populated database that I would also like to transfer to the new server.Any help greatly appreciated.Roger Swetnam
Having one invoice table (ord) and one 'person' table (actor) I would like to include the name of the person who is responsible for an invoice: SELECT Ord.OrdNo, Ord.Selbuy, AC.Nm AS 'Responsible', AC.EmpNoFROM OrdLEFT OUTER JOIN Actor AS AC ON Ord.Selbuy = AC.EmpNoWHERE ord.ordno = 23505 This works perfectly fine if Ord.Selbuy has a corresponding value in Actor:|26914 |21|Yvonne| 21| or if there is no corresponding value in Actor:|26914 |21|NULL| NULL| But what if Ord.Selbuy=0? Then I end up with 3285 rows from Actor! This happens because Actor.EmpNo=0 is allowed. Persons which have never been employed or used to be employed gets Actor.EmpNo=0.Can I create a SELECT statement which only returns data from the INVOICE row if Ord.Selbuy=0?|26914 |21|NULL| NULL| p.s. I'm not able to change table structure/behavior of update procedures, because the tables/code belong to a "bought from the shelf"-business system.
Based on a table like below I have created a report so that I can compare number of items in the main warehouse (LOCATION1) and the outlets (LOCATION2 and LOCATION3).
Now the issue starts when I add a parameter to my report for user to choose which outlets (LOCATIONs) he wants in the equation. I know how to make a column disappear based on parameter value but how to take it out of equation? At the moment when user selects only LOCATION2 and not LOCATION3 then data is not filtered correctly:
Ideally I would like a user to select random outlets (warehouse would be static on the report) and compare one or multiple and only show records that are 0 in the outlets.
If my backup starts at 8PM and take 1 hour to complete, will the changes made to the database during that hour be captured in the full backup?
Stated another way, will my backup be a snapshot of: a) 8PM when the backup started b) 8PM with some of the changes made between the hour c) 9PM when the backup finished?
Anybody know the exact way SQL Server handles that logic?
I need to export a database, x, of a server, X, to another database, y, of a server, Y and I need export the database schema only, not include the data. Does anyone know how to do that? Many thanks for replying.
I need to send an email for each row in a dataset. The data set will contain the order number. I need to first look up the order detail based on the order number and put it into an e-mail. Should I use the OLE DB command object for this?
I have a trigger that uses SQL Mail to generate an email everytime a new record is added. I would like the following fields included in the email with the last record that was entered:
I've set up DB mail and sent a test e-mail and that comes through fine.
I set up an Operator with email Name: DWhelpton@k-and-s.com;MWeaver@k-and-s.com
I created a job and set up the notifications to e-mail the operator on failure.
When the job runs and fails, I do not get an e-mail and I get the following exception in the db mail log:
Date 2/2/2007 8:35:00 AM Log Database Mail (Database Mail Log)
Log ID 402 Process ID 3936 Last Modified 2/2/2007 8:35:00 AM Last Modified By NT AUTHORITYSYSTEM
Message 1) Exception Information =================== Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException Message: Could not retrieve item from the queue. Data: System.Collections.ListDictionaryInternal TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Controller.ICommand CreateSendMailCommand(Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DBSession) HelpLink: NULL Source: DatabaseMailEngine
StackTrace Information =================== at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession) at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateCommand(DBSession dbSession) at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db) at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
I am using nt4.0 sp5 with sql7.0 sp3 and exchange client. Does anyone know how to keep xp_sendamil form putting a copy of the mail message in the sent mail folder or an automated process for deleting all mail in the sent folder? As it stands now I must manually delete all messages from the sent mail folder on a daily basis.
Lokendra writes "I have configured the Database mail profile and account in Sql Server 2005 but the mail is not sending and showing the following error message:
Error,235,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-03-05T15:16:07). Exception Message: Cannot send mails to mail server. (Mailbox name not allowed. The server response was: Sorry<c/> that domain isn't in my list of allowed rcpthosts.). ),3000,90,,3/5/2007 3:16:07 PM,sa
but while in the same mail set up in previous instance of sql server 2005 the message was sending very well. After installing new instance of sql server 2005 the problem is arising.
Anybody can tell me that what I can do so that i can send mail using the SMTP databasemail account."
Dear all, I have switched off the firewall settings on my system and as suggested im entering the minimal information and data to send the mail. but still the Mail Task is failing.. plz suggest.
Hopefully someone out there will have an idea as this is driving me nuts.
I've setup a task to email on success/failure and keep receiving the following message when executed:
Progress: The SendMail task is initiated. - 0 percent complete [Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.". Progress: The SendMail task is completed. - 100 percent complete Task Send Mail Task failed
When I configure Outlook Express on the same machine with the same settings it works.
On the SMTP Connection Manager I have left the default name, tested with both an IP address and Server Name, and no authentication or SSL.
On the Send Mail Task, it uses the above connection. The To: , From: , Subject fields are populated. Message SourceType is DirectInput, MessageSource is Test, Priority is Normal and no attachments or expressions etc.
Nothing useful is logged in the Event Viewer even with full logging turned on.
Ok i have a programmer who wants to send out the data from a table as an email attachment via sql mail without having to write a com component. Does any one know the procedures on how to do this (i.e stored procedures and triggers ect and anything else i need or should know).
Please dont answer this unless you have some genuine help as I dont want to post this every time someone comes up with a smart ass comment! Thanks guys
I need to set a trigger so that an email is generated when a row is inserted into the ABC_DB_OnlineFormsConfirm table. The message will include data not only from that table, but from a related table called ABC_DB_OnlineForms. The common field between the two is FormID. This is related to an online account application process where the user has the option of completing it in one session, or saving it and coming back at a later time. Once the user has completed the first screen and clicks continue, a record is written to ABC_DB_OnlineForms. At the very end, when he clicks “Save and Complete”, a row is written to the ABC_DB_OnlineForms table. I would like the body of the email to include three separate lines, as follows. The first two pieces of data come from the OnlineForms table and the third from OnlineFormsConfirm. The field names are userid, IRSBackup and ConfirmationCode.
UserID: Subject to IRS Backup Withholding?: Confirmation Code:
What I have below results in an email body that contains the confirmation code all by itself. If I switch @body=@MessageBody to @body=@UserID or @body=@Backup, it will report the correct single piece of data, but I have no idea how to get all three pieces at once as separate lines including the leading descriptor (UserID:, Confirmation Code, etc.).
CREATE TRIGGER SendEmail ON [ABC].[dbo].[ABC_DB_OnlineFormsConfirm] AFTER INSERT AS Begin Declare @MessageBody varchar(100)
Hello, The Database Mail feature is already enabled on the server, also I have a mail account on the other server. The problem I faced is that I need to send mail from my SQL Server using a created email account on the other server. How should I configure my email to do that ? Should I use a sysmail_add_account procedure to enable account, also set profile and profile account ? Does this way creates server mail account that is binded with other email account? The mail should be sent from my SQL Server. Thank You.
Our company use yahoo business mail server for our corporate mails. I know that I can configure database mail with SMTP. But when I try to configure database mail account with yahoo bizmail, I cannot do that. It gets configured but when I test it it doesn't send any mails. Do I need to have any special condiguration for this. SMTP address is smtp.bizmail.yahoo.com. Also I have specified the Authentication using my user name and password. Please help
I keep getting a generic "Error Sending Mail" error. For testing purposes I am just trying to send using my own email account. What goes in the SMTP Server box in the connection manager? I have tried:
A - the exchange server address (SOMETHING.us.company.com) B - The SMTP properties I see when I look at the properties of my email address: (my.name@abcd.efgh.company.com) C - Just the end portion of the SMTP properties: (abcd.efgh.company.com) D - My email address (my.name@company.com)
I don't know what to enter, or what is giving me such a generic error message.
I know you can specify additional recipients in the To column by sepperating them with a semicolon. But whats the easiest way to send to several users, when the email address must be retrieved from a table with a query like this:
select email from problem_subscribers
where project = 'project1'
and statusmail = 'OnError'
So when the eventhandler gets an OnError i want the mail task to be sent to each problemsubscriber.
Hi all, I'd like to link a SQL Server database / table to Microsoft Exchange Server E-Mail-Address data, for an Employee Directory project.
I've read a little about "Web Store", a little about ExOLEDB, but I've come across nothing along practical lines. I.e., I still don't know where to begin!
For example the "Web Store" should be created on the SQL server, but how do you create it? Any insights will be greatly appreciated.
I have an Execute SQL Task that runs a simple SELECT query. I have the result set = Full Result Set. The variable is of type Object and the value is System.Oject. After successful completion of the Execute SQL Task, I am doing a Send Mail task. For the Message Source, I want to use this Object. The drop down is only listing variables of type String. Can you not use a variable of type Object in a Send Mail Task? If not, what is the easiest workaround? Thanks!
Does anybody have experience with e-mail distribution using Data Driven Subscriptions? I want to build the following:
I have a table with names and e-mail addresses of people in my data warehouse. This table changes over time, more people will be added and data (for example e-mail addresses) can change. I made 1 report that I want to mail to all the people in the table. This report contains 1 parameter; the e-mail address of a person. So basically its quite simple: I want to e-mail all the people in the table a personalized (by the parameter) report each month.
Can anybody tell me how I can achieve this with SSRS 2005(SSEE)? I know how to make a data driven subscription but how can I make one pending on the data in a table?
Any help would be appreciated. I will write a blog about this when I've done it so your input will not get lost.
i have to create a scheduled task that does the following:
a) creates an Excel Spreadsheet from a SQL Query
b) sends the spreadsheet to a user
i then need to schedule this task so that it runs every day and creates a NEW spreadsheet (doesnt matter it the name is the same as long as it overwrite what is already there)
HELP me PLEASE i dont like this SQL Game anymore !!
Hi, I have created a profile named sqlmail in exchange server. I tried to run the sql mail service from support service under sql mail to put the profile name, I got the following error: can any one assist me in setting up sql mail in an sql server 2000. .... thanks Ali
Microsoft SQL - DMO(ODBC SQLState: 42000) Error 18025:xp_test_mapi_profile: failed with mail error 0x80004005
NOT ABLE TO SEND TEST MAIL FROM DB MAIL...The mail could not be sent to the recipients because of the mail server failure. . Exception Message: Cannot send mails to mail server. (Failure sending mail.).Exception Message: Cannot send mails to mail server. (Failure sending mail.).
I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.
I've defined a public profile. I've enabled Database Mail stored procedures through the Surface Area Configuration .
but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .
when I execute sp_send_dbmail in the Managment Studio the message is "Mail queued" but the mail is not sent.
Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?
here is the log file after executing sp_send_dbmail:
1) "DatabaseMail process is started"
2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."
The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?