.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

sp_send_dbmail Indicates Mail Queued but no Message Received

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :Sql Server

This is running on SQL Server 2008 R2 Enterprise 64 Bit Edition. In the following procedure, I am trying to pull elements of an email message from a table called EventNotice, and use those values when executing sp_send_dbmail:

 @EventNoticeID Int,
 @Profile_NameLocal varchar(10),
 @SubjectTextLocal varchar(200),
 @BodyLocal nvarchar(MAX),
 @Body_FormatLocal varchar(50),
 @ToLocal nvarchar(500),
 @PackageNameLocal varchar(100),
 @MachineNameLocal varchar(100)
 SET @PackageNameLocal = 'CreatePositivePay'
 SET @MachineNameLocal = 'NewMachine'

  SET @EventNoticeID = 3
   @Profile_NameLocal = Profile_Name,
   @SubjectTextLocal = @PackageNameLocal + ' executed on ' + @MachineNameLocal + '. ' + SubjectText,
   @BodyLocal  = BodyText,
   @ToLocal  = ToRecipient,
   @Body_FormatLocal = Body_Format

  FROM dbo.EventNotice
  WHERE EventNoticeID = @EventNoticeID
  EXEC msdb.dbo.sp_send_dbmail
   @profile_name = @Profile_NameLocal,

View Complete Post

More Related Resource Links

mail not received frm asp.net mailing module

i am sending mail thr' asp.net using System.Net.Mail i am not getting any error msg but nor am i getting the mailsi hae sent it to yahoo, gmail & rediff ids but mail is not recivedhow do i check out if there is any prblm on my end code or why its not been sent   i have used Catch smtpExc As System.Net.Mail.SmtpException for checking out any exeption

how send mail with out help of sp_send_dbmail in sql server 2005

Hi all, I want to sent mail using sp_send_dbmail but the hosing have problem as it require admin permission on master db so  they told me not use this SP is there any other method so that i can send the mail using SQL Server 2005  Thanks and Regards Er.Pradipta Nayak

Sending a Mail Message to Multiple Addresses Using System.Net.Mail

 VWD 2008 Express.  Visual Basic. I use the following routine (XXXXX have replaced sensitive data) to try to send an email message to mutiple email addresses.  It only sends to the first email address in the comma-delimited list.  How can I send the message to multiple email addresses?  Thanks for the help. Protected Sub SendButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SendButton.Click 'Send the message to all users who have emails. Dim smtpClient As SmtpClient = New SmtpClient() Dim message As MailMessage = New MailMessage() Dim Success As Boolean, I As Integer, strTO As String = "" Try 'Gather all user email addresses Dim strSQL = "SELECT EMail from aspnet_membership where Email<>''" Dim MyDataset As DataSet = GetDataSet(strSQL, Success) I = 0 For Each dr As DataRow In MyDataset.Tables(0).Rows If I = MyDataset.Tables(0).Rows.Count - 1 Then strTO = strTO + dr("Email") Else strTO = strTO + dr("Email") + "," End If I = I + 1 Next Dim toAddress As New MailAddress(strTO, "To All Users") 'Ga

problems when sending mail from mail program - receive exception Message MSCORLIB


When sending out email through Live mailer pro I get now the following message for each email that I want to send:


Error Message

String was not recognized as a valid DateTime.


Stack Trace

   at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   at System.DateTime.Parse(String s, IFormatProvider provider)
   at System.Convert.ToDateTime(String value)
   at Mailer.TrackProxy.get_IsTrackOK()


Can someone tell me what I have to do to solve this problem?

I use windows server 2k



Mail Message in ASP.NET 4


I am trying to rewrite a mail message app that I have been using in 3.5.  However, I am having a little bit of an issue writing it in 4.0, simple, I cannot find system.net or MailMessage.  I know that VS projects don't point to the framework directly, but a collection of frequently used name spaces, is this the issue that I am having?  I am doing it in C Sharp, and have added the System.Net namespace to the reference section of the project.  Can someone point me in the right direction?


Include a static hyperlink in infopath form mail message



i know i can add a hyperlink in an infopath form. but can this be done in an email message?

i want to submit a form using email. but i dont want the form to be attached to the mail. instead i want to use the hypelink.

can i do this?

WCF client fails with The message received was unexpected or badly formatted and Decrypt failed with


I have written a console mode WCF client that contacts an Apache based web service that uses OpenSSL  0.9.8 tls or ssl3.
The WCF client uses client certificates on Windows 2008 SP2 x64. The client had been running for months with no problem, and then I started getting the errors below around Nov 8 2010 (below).
I have done my best to include all the details. Please read carefully.
The relevant traces, exceptions, code and config are included in this post.

1.) Fix it.
2.) Find out what 0X80090326 means.
3.) Find out what policies/acl's apply to the situation

The only thing I can be sure of that did not change is the code.

Can anyone point me toward the next step?

- The program executes as a local user (non-domain) that is in the Local Administrators group.
- I can display the server url using IE and Firefox, provided I have the certs installed for personal use.
- The certificates are installed in the LocalMachine store in "TrustedPeople" - NOT the user's location, the machine location. The local user finds the proper key, as the trace below will show.

What I have googled for:
- 0X80090326
- Decrypt failed with error 0X800

Only some e-mail gets sent successfully from sp_send_dbmail (Database Mail) on SQL Server 2005


Hi, this is my first attempt on this forum to find an answer to what is happening when I use sp_send_dbmail on SQL Server 2005. I have been googeling but without success and I don't know really where to turn now.

This is the scenario:

I have set up a mail function on our SQL server. I have the e-mail addresses in one table and the content in another table. For each address I find in my table, I use the sp_send_dbmail Stored Procedure (SP) to compile a new message to the address.

When I later execute my own SP that does the above (takes the email and compiles a new message to the recipient), DatabaseMail90.exe starts on the server and the e-mails are being sent out. But this is where it gets tricky, because some of the mail are being distributed directly, probably because it is on the same domain and network. The complicated thing is that most - not all - external mail gets an error in the msdb.dbo.sysmail_mailitems table. But the confusion does not stop here. Some of the e-mails are being delivered even though it has a reported error in the msdb.dbo.sysmail_mailitems table.

This is the query I use to view sent messages status:

 sent_status, --0 new not sent

SharePoint 2007 alert me sent out mail with wrong message


I have created a document library, and this doc library has set alert me. On this doc library, there is field name Category, this is a multiple check box with value like A, B, C, D.

I uploaded a document Test.doc as sample with Category D, then the new added item alert email was sent out. And problem came out, in the alert email body, the item Text.doc with wrong Category A instead of D.

I tried another two items again with Category B and C, but all these items with wrong Category A in the alert email body.

Can any body give help on this? Thank you so much!

Gmail internal chat like message box

This article provides you with the multi-functional message box window through which the usability of the web-site or any web application increases.

.Configurable MessageBox window with AJAX Support
.can set maximum number of message boxes to be visible
.can define the auto reload time, for single message, for all messages or no reload
.can create messages through a single function call
.can define auto hide time for each messages

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.


i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





Mail Merge




I am after creating a mail merge documents from datasource and .dot template file on server side. Can you give me an idea how i will achive this?


Thanks in advance.



Syed Hussain



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend