Sending E-mail On SP Action
Jun 18, 2008
Hello all,
I've run into a situation which I'm not sure which option to use. I have a web-based app that needs to send an email to a user once an auction has ended (the user being the winning bidder). The backend of the app is SQL 2005. I'm trying to figure out how to get this to work but I'm not sure if I should be using Database Mail or if I should be using a windows service on the web server that pings the database to check if the auction has ended and if the user has been notified. Can anyone shed some light as to which way I should be doing this? Additionally, I'm planning on formatting the style of the mail message so it'll need to be in HTML format and not plain text.
Any help is greatly appreciated.
Regards,
Axel
View 17 Replies
ADVERTISEMENT
Aug 18, 2015
I have to send mail with HTML formatĀ and attaching multiple files dynamically via send mail task.
View 10 Replies
View Related
Mar 7, 2007
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."
View 1 Replies
View Related
Dec 13, 2007
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.
View 11 Replies
View Related
Jun 8, 2006
Hi Everyone,
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.
Any suggestions appreciated,
Thanks.
View 11 Replies
View Related
Feb 6, 2008
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.
View 7 Replies
View Related
Nov 10, 2006
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.
View 3 Replies
View Related
Mar 9, 2007
Hi every body
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?
please help me.
POUYAN
View 21 Replies
View Related
Oct 14, 1999
Hi.
I have problems with sending a mail from SQL Server:
SQL Mail starts.
Command: xp_sendmail 'MRudyk','Halo!'
returns:Unknown recipient: Parameter '@recipients', recipient 'Mrudyk'
'Mrudyk' is valid recipient...
View 2 Replies
View Related
Mar 28, 2008
I have written a stored procedure which should send mail from the stored procedure in sql server 2005. Here is the SP
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgo
ALTER Procedure [dbo].[sp_SMTPMail]
@SenderName varchar(100),@SenderAddress varchar(100),@RecipientName varchar(100),@RecipientAddress varchar(100),@Subject varchar(200),@Body varchar(8000),@MailServer varchar(100) = 'smtp.mail.tspl.com'
AS
SET nocount on
declare @oMail int --Object referencedeclare @resultcode int
EXEC @resultcode = sp_OACreate 'SMTPsvg.Mailer', @oMail OUT
if @resultcode = 0BEGINEXEC @resultcode = sp_OASetProperty @oMail, 'RemoteHost', @mailserverEXEC @resultcode = sp_OASetProperty @oMail, 'FromName', @SenderNameEXEC @resultcode = sp_OASetProperty @oMail, 'FromAddress', @SenderAddress
EXEC @resultcode = sp_OAMethod @oMail, 'AddRecipient', NULL, @RecipientName, @RecipientAddress
EXEC @resultcode = sp_OASetProperty @oMail, 'Subject', @SubjectEXEC @resultcode = sp_OASetProperty @oMail, 'BodyText', @Body
EXEC @resultcode = sp_OAMethod @oMail, 'SendMail', NULL
EXEC sp_OADestroy @oMailEND
SET nocount offexec sp_smtpmail 'ramana','venkataramanaiah.uppalapati@tspl.com','rajan','ramana.u@gmail.com','test','This is a sample message'
when i execute the SP by giving the following input parameters like
exec <spname> 'rajan', 'rajan.crp@tspl.com', 'venkat', 'venkat@tspl.com', 'test', 'Test Message'
It ran successfully but the recepient venkat@tspl.com did'nt receive any mail from rajan.crp@tspl.com
I used the following commands for configuring OLE Automation Procedures
exec sp_configure 'Show
View 4 Replies
View Related
Apr 27, 2000
I am having a problem with SqlServer 7.0 sending mail when the sqlserver account is not logged into the machine and mail is open. If I log off of the box and an alert sends mail it just sits in the outbox of the mail client until I log in. Is this the way it is supposed to be or am I doing something wrong. I am using the Inbox as my client.
Thanks
Tom Goltl
View 1 Replies
View Related
Jul 22, 2006
Hi,
I am using SQL Server 2005. I have configured my email on Database Mail. when I am trying to send email using xp_sendmail I am getting problem error as:
Msg 17925, Level 16, State 1, Line 0
xp_startmail: failed with mail error 0x80040111
I am using following sql statement
master.dbo.xp_startmail 'myaccount','mypwd'
master.dbo.xp_sendmail 'tomail1@mail.co.in','test'
where myaccount and mypwd is my password on my email profile.'tomail1@mail.co.in' is the destination email address..
thanks
View 15 Replies
View Related
May 9, 2001
I need help regarding how to send mails through SQL server. Let me give you some more details: I am having a table where in all the e-mail id's are stored so i need to write a stored procedure that will pick up the email id from the table and it has to send the mail once you run the stored procedure.
Any help in this regard will really help...pls help me out...
View 1 Replies
View Related
Aug 25, 2000
Hi,
I have few DTS package schedule on my SQL Server 7. When the DTS fail, it's supposed to send an e-mail to me. But, for an unknown reason, the server send me some e-mail to report the failure of the DTS and suddenly...nothing. The server stop sending e-mail to report the failure of the DTS package. I decided to restart the Server and... i receive over 300 e-mails that i was supposed to receive 3 week ago about the failure of the DTS package. It's not the first time that this problem occur and everytime i need to restart the server, now i am tired of that.
Does anyone have see this problem before?
Martin
View 1 Replies
View Related
Jun 9, 2008
Hai to all.,
Im trying to send mail from Sql server but my efforts were ended in vain can any one help me on this.,
I have done the coding lik this..
step 1:
use master
go
sp_configure 'show advanced options',1
go
reconfigure
go
sp_configure 'Database Mail XPs',1
go
reconfigure
go
Step 2:
EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name = 'Admin', -- Account Name on SMTP (User Defined)
@description = 'Mail Account for Database Mail',-- Account mail description. (User Defined)
@email_address = 'chandrubrave@gmail.com',-- Mail sender E-mail address (User Defined)
@display_name = 'Admin', -- Mail Sender display name, which displays, when mail received by recipient (User Defined)
@username= '', -- SMTP Sever User Name
@password='', -- SMTP Server Password
@mailserver_name = '190.160.110.50' -- SMTP Server Address'.
step 3:
EXECUTE msdb.dbo.sysmail_add_profile_sp
@profile_name = 'New profile',
@description = 'Profile used for database mail'
Step 4:
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = 'New profile',
@account_name = 'New Admin',
@sequence_number = 1
Step 5:
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@profile_name = 'New profile',
@principal_name = 'public',
@is_default = 1 ;
Step 6:
declare @body1 varchar(100)
set @body1 = 'Server :'+@@servername+ ' My First Database Email '
EXEC msdb.dbo.sp_send_dbmail @recipients='chandramohanc@zylog.co.in',
@subject = 'My Mail Test',
@body = @body1,
@body_format = 'HTML' ;
I have got a response like --Mail queued.
But i dint get any mail and also in msdb.dbo.sysmail_event_log table have got an entry with description fails ..
Sorry for posting such a long post..
Thanks In advance
View 2 Replies
View Related
Feb 24, 2007
Hi All,
I'm trying to send mail from sql server I searched the net and i have some things needs calrification and help
What is the difference between sqlmail and sql agent mail ?
is it possible to use and configure them with out having OutLook installed on the server?
when creating a mail profile to be used by SQL mail this profile must be created under the account that runs SQL SERVER Service .. must this account be authenticated under Exchange server if i connect to it ??
to connect to Microsoft Exchange Server can i use the XPSMTP or i have to use SQL MAIL ??
Too much questions i Know but i appreciate your help any way
View 3 Replies
View Related
Jun 11, 2007
Hi,
i want to send Mail from sql server.which means that when i execute an query a mail will send to mentioned e-mail.is it any predefined function is there?.if,yes,can u explain Detail.
Regards
Umapathy
View 2 Replies
View Related
Jun 12, 2007
I need to find a way to send mail in blocks of 100 and 500 at intervals of 120 seconds. Does anyone know of any code for this?
Thanks!
Etymon
View 4 Replies
View Related
Jun 29, 2007
Hi,
I have 0 experience with SQLMail, and I don't want to go too deep into it as I already am trying to learn more than I can with the other parts :) I'm wondering, is there an easy way to have SQL Email me when anything strange happens with the SQL server? It would be awesome to get alerts to my phone.
Thanks very much
mike123
View 4 Replies
View Related
Feb 14, 2008
Hi,
I have the table like
Id Pickuptime
1 2008-02-14 13:07:06.317
If the record is inserted to the above table that would look at a pickuptime field in a table and if pickuptime is 2008-02-14 13:07:06.317 after 6 hour from the pickuptime then I would send a email to briteindia_kumar@hotmail.com
How i would do this would any one help to me.
Thanks
kumar
View 2 Replies
View Related
Mar 27, 2008
Dear Gurus
I have got a requirement.
I need to send mail with an attachment.
for eg.
An employee has requested leave a mail should go to the person he is reporting to as a mail and with this mail
an attachment of the leave request should be sent.
When the person who recevies mail he opens the attahcment and apporves the leave request or rejects a return mail to go to all concerned.
View 3 Replies
View Related
Oct 14, 2006
I am creating a membership site. I’d like to be able to have members be able to send customized e-mail to their own individual e-mail list. In creating the mail function (at least just a simplified version so I can get the basics to work), I’m using a select statement that uses @UserName as a parameter in the WHERE clause. I can’t get this work, however, and one of the error messages I get says “must declare the scalar variable '@UserName'". Below is the code I’ve come up with, which may be far off. I'm new to programming so please keep that in mind. I’m using Visual Studio 2005 and SQL Server 2005. If anyone has any suggestions, I’d really appreciate it! Thank you.Imports System.Net.MailImports System.Data.SqlClientImports System.Web.UI.WebControlsImports System.WebPartial Class emailInherits System.Web.UI.PageProtected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.ClickDim MyEmail = New MailMessageDim MyClient = New SmtpClient("localhost")Dim FromAddress = New MailAddress(Profile.Email)MyEmail.From = FromAddress'-- Create MailAddresses from a database'-- Open a database connectionDim DBConnection = New SqlConnection( _"Server=localhost; Integrated Security=True; database=WebSite18database")DBConnection.Open()Dim SQLString As StringDim SelectParameters = New Data.SqlClient.SqlParameter("@UserName", Data.SqlDbType.VarChar)SQLString = "SELECT [UserName], [ClientFirstName], [ClientLastName], [CleintEmail], [ClientID] FROM [Clients] WHERE ([UserName] = @UserName)"Dim DBCommand = New Data.SqlClient.SqlCommand(SQLString, DBConnection)'-- Retrieve a recordset of selected records from the databaseDim DBReader As SqlDataReader = DBCommand.ExecuteReader()While DBReader.Read()Dim ToAddress = New MailAddress(DBReader("ClientEmail"))MyEmail.To.Add(ToAddress)End WhileDBReader.Close()DBConnection.Close()MyClient.Send(MyEmail)End SubEnd Class
View 2 Replies
View Related
Mar 28, 2008
Hi,
I have created a stored procedure for sending mail. While executing that i am getting the following error message:
SQL Server blocked access to procedure 'sys.sp_OACreate' of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ole Automation Procedures' by using sp_configure. For more information about enabling 'Ole Automation Procedures', see "Surface Area Configuration" in SQL Server Books Online.
Can anybody explain me how to resolve it?
Expecting the solution at the earliest
View 2 Replies
View Related
Sep 14, 2001
I am writing a stored procedure that sends mail to different distribution lists depending on different variables. I am having trouble passing in a local variable into the @recipients parameter for xp_sendmail. How can I do this?
View 1 Replies
View Related
Mar 1, 2006
Dear All,
I need to create a functionality in SQL server 2000 that would send out data from a table to users within our company.
Is there some built in funcitonality wherby i can mail out the selected data from the table from a stored procedure? Then i could schedule the stored procedure to be run every morning at 7 am.
Never done this, can some one let me know if that would work and give me some pointers on what commands to use in the stored procedure? Thanks in advance!
View 7 Replies
View Related
Dec 17, 2007
I have a website that I want to put a contact form on so I can allow users to send emails from it. I have SQL Server as my db but my hosting co. won't allow me to use the Database Mail procedure to send emails (msdb.dbo.sp_send_dbmail I think it's called).
I will have to write my own procedure to do it instead. Can anyone point me in the direction of some good resources where I might get some info on how to do this?
View 6 Replies
View Related
Jul 20, 2005
Hello,Does anyone know how I can set SQL Server up so that after it hascompleted a backup sucessfully it will send the completion report toan e-mail address via SMTP.Unfortunatly we cannot install MS OUTLOOK Express or similar.Is this possible?Many thanks in advance,Allan Martin
View 2 Replies
View Related
Dec 19, 2007
Hello Friends
I want to send mail using Stored Procedure using SQL Server 2000 using windows smtp component. I don't want third party component.
can any body send Stored Procedure.
View 1 Replies
View Related
May 25, 2007
Hi All,
When I am execute the SSIS packages in my machine, it is working fine,
The SSIS package contains Send Mail task, but if the same application is executed by my colleague,
he is getting the error "Failure Sending mail", but he was able to execute the same application successfully previouly. but he can able to send the mail from his outlook.
Any suggestions appreciated.
Regards,
Nathan
View 2 Replies
View Related
Mar 19, 2007
Hi
Using SQL to send e-mail , returns the next error when sending to hotmail user.
Error,53,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2007-03-16T09:43:38). 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 (#5.7.1)).
),244,79,,16.03.2007 09:43:38,sa
Any one can help?
Thanks,
Rodrigo Vieira
View 5 Replies
View Related
Oct 19, 2006
We have a ASP.Net 2.0 web application and need to send out emails. We have an EmailQueue table in our database where email gets stored before it is send out. We are looking at the pros and cons of using Database Mail in SQL Server 2005 to send out our emails. Should we use SQL or our web app to send email???Tips, tricks, articles, experiences, opinions are greatly appreciated. Newbie
View 2 Replies
View Related
Mar 29, 2001
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
View 1 Replies
View Related
Nov 14, 2007
I'm trying to create a SSIS package that will send me a email when the package runs successfully and when it fails. My entire package runs successfully until it get to the Send Mail Task, where it always fails. Do I have to configure something on the database end or what? Thank you in advance.
Using SQL Server 2005
Using sample database AdventureWorks
View 4 Replies
View Related