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


Top 5 Contributors of the Month
david stephan
Asad Ali
Fauzul Azmi
Post New Web Links

Database Mail configuring the maximum mail size (not attachment 'MaxFileSize')

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :Sql Server
 
Hi can anyone tell me if it's possible to configure the maximum size of an email when using database mail?  I know it's possible to use sysmail_configure_sp to set 'MaxFileSize', I want to prevent an email being sent the size of the body of the email is very large. In my case the body is based on a query result set inserted as html. Thanks      


View Complete Post


More Related Resource Links

SQL and Outlook: Enable Database Access and Updates Through Exchange and Any E-mail Client

  

Using Microsoft technologies, you can insert, edit, query, and delete database entries using any e-mail client such as Hotmail, Outlook, Yahoo, or even WAP phone. While e-mail is certainly a powerful and widely used tool, it is usually not integrated with an application for performing any tasks other than sending reminders. The application scenario described here, an e-mail-based SQL update program, uses a simple data model; however, this solution will apply to any data model that you are working with. It will also eliminate the need for complex n-tier Internet applications and serves as a low maintenance solution for providing data access.

Alok Mehta and Daniel Williams

MSDN Magazine January 2002


Modify Subject line of Notification e-mails sent by Database Mail

  
Hello All, I am using database mail for SQL Server Agent Job notification.  It is working just great. However the e-mails that I receive have a specific format of subject line as below. SQL Server Job System: 'TEST' completed on \\Server_Name I wanted to see if I can modify this to send e-mails with this subject line. SQL Server Job System: 'TEST' completed on <Server_Name> Is this possible?  If so can someone help me with the steps? Thanks.

Send E-mail with attachment with workflow

  
I use workflow in custom list. When new item is created and have attachment. An e-mail is send with attachment. I can not add attachment, or I don’t know how to do that with lookup. I can add link with ID of newly created item, which is ok. But I would like to add attachment directly…Borut

Database Mail error

  
Hello I am new to SQL Server 2008. I am upgrading from 2000 to 2008 and currently working on Database Mail. I can send a test mail to say an email address like abc@xyz.com If i create an operator with the above email address, I am getting this error (in Database Mail log) when i send a test mail to Operator.  Message The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2010-09-07T10:31:24). Exception Message: Cannot send mails to mail server. (A recipient must be specified.). ) Any idea why Database Mail is able to send email when email address is specified and fails to send email to the same address when used in operator? Thank You, V

Mail data is truncated in Database mail

  
I have sent mail using Database mail...But I am getting only part of data in mail... The mail size remaining same. 8kb Is there is any limitation on mail size???Cheers...vaibhav

Incoming E-Mail with attachment not starting SharePoint workflow (VS 2008)

  
I am working on SharePoint 2007 workflow in visual studio 2008. The workflow is attached to an email-enabled list and is supposed to automatically start on incoming email. It works fine when email (without attachment) is sent to the list but the workflow cannot start when the email is sent with attachment. There is no error message but the workflow status field is blank. The attachment field is also blank. When I manually run the workflow, it works fine. This problem happened on Staging and production servers. On Development server, the workflow works fine either way. The list is setup to save attachments. Any help please

Incoming E-Mail with attachment not starting SharePoint workflow (VS 2008)

  
I am working on SharePoint 2007 workflow in visual studio 2008. The workflow is attached to an email-enabled list and is supposed to automatically start on incoming email. It works fine when email (without attachment) is sent to the list but the workflow cannot start when the email is sent with attachment. There is no error message but the workflow status field is blank. The attachment field is also blank. When I manually run the workflow, it works fine. This problem happened on Staging and production servers. On Development server, the workflow works fine either way. The list is setup to save attachments. Any help please

Database Mail Error Logs

  

I am New To Work With C#.I need To Retrieve The All Error Log In SQL Server.I Had Done All The Logs Except Database Mail Error Log. I need an An Help for How To Retrieving The Database Mail Error Log through C# Coding.

Regards

Suresh


Getting Error in Database Mail in SQL 2008

  

Hi,

 

I have configured Database Mail using sp_send_dbmail in SQL 2008. It was working fine but then it suddenly stops working

 

I tried to send a test e-mail from the Database Mail, and I got the following error message:

 

Getting below error:

Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail. (Microsoft SQL Server, Error: 14641)

 

attachment in mail not working on webserver

  

hi everybody i am using the mail sending facilily in asp.net using system.net.mail and system.net.mime.my code is work fine on local host but show the followiing error on webserver as exception

System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\vhosts\dakshtechnology.com\httpdocs\Sec-77 Price List....doc' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at Recruitment.btnsubmit_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\dakshtechnology.com\httpdocs\Recruitment.aspx.cs:line 83


 i am using the following code

            if (fleupload.PostedFile != null)
            {
                HttpPostedFile attfile = fleupload.PostedFile;
                int attachfilelength = attfile.ContentLength;
                if (attachfilelength > 0)
                {
                    string attachfilename = Path.GetFileName(fleupload.PostedFile.FileName);
                    fleupl

Database Mail - How to clear queue list ?

  

Hi Experts,

 

i had a job on my client database which is running every 3 minutes to send out all my mail item list using Database Mail.

This job will automatically send out email which is retrieve from one of my table (DocumentQueue).

So whenever user click "Email" button on my system, system will add record on my table (DocumentQueue)

and every 3 minutes my job will started to send out all email in DocumentQueue which is not being send.

 

What my problem is... the recipient on my table in the wrong format, ie: admin@google.com;stone.wu@g;

And this email is being send on 09:00.

It keeps sending email every 3 minutes...

on the 1st 10 minutes the errors on sysmail_log was : 

"The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2010-10-04T09:28:00). Exception Message: Cannot send mails to mail server. (The specified string is not in the form required for an e-mail address.). )"

and after 10 minutes the errors was :

"The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2010-10-04T12:42:00). Exception Message: Could not connect to mail server. (An operation on a socket could not be performed because the system lack

Database Mail

  

Using SQL Server 2005 SP3 x64bit environment.   I configured Database Mail and can successfully send Test-Email.   However, when I create an Operator and configure a SQL Job to send a Notification to that Operator,  it never sends.

Any suggestions?


Database mail process does not start, no error generated, for only one maintenance plan

  
I have three maintenance plans:

1. Application DBs - 2am (checks integrity, full backup, log backup)
2. System DBs - 3am (checks integrity, updates statistics, full backup)
3. Backup and log file cleanup - 3:30am (removes backup history, .bak and .trn files)

For items 1 and 3 above, I see the database mail process start up and receive emails that the jobs completed.  For item 2, no email....the database mail process does not start and there are no errors in the event log.  The job history shows that the job completed successfully.

I'm having the same problem on a different server, except that items 2 and 3 email me their results, but item 1 does not.  Same exact job steps and times of execution.  None of the jobs are set to notify the operator, the notification is coming from the maintenance plan.

Obviously I've gone through the basics:

Configured an operator
Created a default, public profile
Enabled mail profile in SQL Server agent
Tested mail delivery

How do I diagnose the database mail process just not starting?  Has anyone seen this before?

SQL Server 2005 SP3, with KB 970892 applied.

Testing Database Mail Locally

  

I am in need of an SMTP server that is easy to configure, and that I can set up on my Windows 7 machine,  so that I can test the functionality of Database Mail. I haven't found anything very intuitive to use.

If you have any suggestions, please share.

Thank you for your help!

CSDunn


SQL Agent Job Notification - Database Mail problem

  
Hi
I'm a little stumped. Have setup database mail on SQL Server 2008 (SP1 x64) and its working fine except when its supposed to send out a SQL Agent job notification.
I've enabled database mail on SQL Agent and have specified a profile, but when it tries to send an email on agent job completion it errors with "NOTE: Failed to notify '<operator>' via email."
Can anybody help?
Thanks


SQL Server Agent Job And Database Mail - Error formatting query, probably invalid paramters

  

We have a stored procedure that we are trying to call with a SQL Server Agent Job. The stored procedure calls Database Mail. This is SQL 2008. The execute task is simply:

 

USE [Production]
GO

EXEC [dbo].[JOB_EMAIL_SCHEDULED_REPORTS]

GO

 

When the job runs, it is erroring out immediately, with the error:

Execute as user: NT AUTHORITY\NETWORK SERVICE. Error formatting query, probably invalid paramters [SQLSTATE 42000] (Error 22050). The step failed.

When we go into SQL Server Manager and just execute the SQL query, it works though. Something within the SQL Server Agent job,  and Database Mail is causing problems. Any ideas? Thanks.

 

 


Categories: 
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