Showing posts with label sending. Show all posts
Showing posts with label sending. Show all posts

Saturday, February 25, 2012

DataBase Mail Test

I have already checked that I can test the "Database Mail" via sending e-mail!

But I would like to ask if this e-mail could be with a digital signature?

If anyone knows the way I can do it,I would like to tell me how I can do it!!!!

Thank you very much

Nikos

I don't think it is possible for the database mail, as the individual third party or outlook based digital signature will not be able to decrypt of check such information. You might need to check on Exchange based forums in this case.

http://aspnet.4guysfromrolla.com/articles/022807-1.aspx fyi and it is only based for data.

database mail problem...Query execution failed: Error initializing COM

Hello -

I'm having a problem sending the query set as an email text attachment. Test transmissions from Database mail working fine.

Send simple messages with the sp_send_dbmail sproc works fine as well.

It is only when I try and send a query result that things blow up. The query itself is working fine also, so I'm now down to think there is some esoteric problem with the sproc itself.

Surface config features have database mail on, and SQL Mail off.

Anyone know the solution to this?

Thanks in advance!

Actual SQL ...

use epic
go

EXEC msdb.dbo.sp_send_dbmail
@.profile_name = 'SQLMail',
@.recipients = 'rvolters@.whaleyfoodservice.com',
@.body = 'Testing sqlmail with sproc.',
@.subject = 'Orders with invalid tech numbers',
@.query = 'SELECT order_no, order_ext, line_no from epic..STG_BNERPT_INVALIDTECHNOS' ,
@.attach_query_result_as_file = 1 ;

Message Results...

Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 476
Query execution failed: Error initializing COM
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.

Investigating the sproc itself shows...


Line 476 in the sproc is the beginning of a 'trap'
--Raise an error it the query execution fails
-- This will only be the case when @.append_query_error is set to 0 (false)
IF( (@.RetErrorMsg IS NOT NULL) AND (@.exclude_query_output=0) )
BEGIN
RAISERROR(14661, -1, -1, @.RetErrorMsg)
END

RETURN (@.rc)
this is the last section of code in the sproc

I have a very similar issue.

When i execute the following everything work 100%.

EXEC msdb.dbo.sp_send_dbmail

@.profile_name = 'DBA Mail',

@.recipients = me@.whatever.co.za',

@.body = 'Test email from server using dbmail',

@.subject = 'Test email from server using dbmail',

@.query = 'SELECT TOP 1 * FROM TABLE A Order by AlertDTTM DESC' ;

As soon as i put this exact code in a trigger i get the following error:

Msg 22050, Level 16, State 1, Line 0

Error formatting query, probably invalid parameters

Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 478

Query execution failed: Error Intiailizing COM . CoInitialize failed with Hresult: 0x80010106

Anyone ?

|||

We have same problem for some time. it has been fixed for us after I made some changes to the security setting and rebooted the server..

We are running SQL 2005 on Windows 2003 SP1. Check the following link

http://support.microsoft.com/default.aspx/kb/926642/en-us

Faeed

database mail problem...Query execution failed: Error initializing COM

Hello -

I'm having a problem sending the query set as an email text attachment. Test transmissions from Database mail working fine.

Send simple messages with the sp_send_dbmail sproc works fine as well.

It is only when I try and send a query result that things blow up. The query itself is working fine also, so I'm now down to think there is some esoteric problem with the sproc itself.

Surface config features have database mail on, and SQL Mail off.

Anyone know the solution to this?

Thanks in advance!

Actual SQL ...

use epic
go

EXEC msdb.dbo.sp_send_dbmail
@.profile_name = 'SQLMail',
@.recipients = 'rvolters@.whaleyfoodservice.com',
@.body = 'Testing sqlmail with sproc.',
@.subject = 'Orders with invalid tech numbers',
@.query = 'SELECT order_no, order_ext, line_no from epic..STG_BNERPT_INVALIDTECHNOS' ,
@.attach_query_result_as_file = 1 ;

Message Results...

Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 476
Query execution failed: Error initializing COM
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.

Investigating the sproc itself shows...


Line 476 in the sproc is the beginning of a 'trap'
--Raise an error it the query execution fails
-- This will only be the case when @.append_query_error is set to 0 (false)
IF( (@.RetErrorMsg IS NOT NULL) AND (@.exclude_query_output=0) )
BEGIN
RAISERROR(14661, -1, -1, @.RetErrorMsg)
END

RETURN (@.rc)
this is the last section of code in the sproc

I have a very similar issue.

When i execute the following everything work 100%.

EXEC msdb.dbo.sp_send_dbmail

@.profile_name = 'DBA Mail',

@.recipients = me@.whatever.co.za',

@.body = 'Test email from server using dbmail',

@.subject = 'Test email from server using dbmail',

@.query = 'SELECT TOP 1 * FROM TABLE A Order by AlertDTTM DESC' ;

As soon as i put this exact code in a trigger i get the following error:

Msg 22050, Level 16, State 1, Line 0

Error formatting query, probably invalid parameters

Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 478

Query execution failed: Error Intiailizing COM . CoInitialize failed with Hresult: 0x80010106

Anyone ?

|||

We have same problem for some time. it has been fixed for us after I made some changes to the security setting and rebooted the server..

We are running SQL 2005 on Windows 2003 SP1. Check the following link

http://support.microsoft.com/default.aspx/kb/926642/en-us

Faeed

database mail problem...Query execution failed: Error initializing COM

Hello -

I'm having a problem sending the query set as an email text attachment. Test transmissions from Database mail working fine.

Send simple messages with the sp_send_dbmail sproc works fine as well.

It is only when I try and send a query result that things blow up. The query itself is working fine also, so I'm now down to think there is some esoteric problem with the sproc itself.

Surface config features have database mail on, and SQL Mail off.

Anyone know the solution to this?

Thanks in advance!

Actual SQL ...

use epic
go

EXEC msdb.dbo.sp_send_dbmail
@.profile_name = 'SQLMail',
@.recipients = 'rvolters@.whaleyfoodservice.com',
@.body = 'Testing sqlmail with sproc.',
@.subject = 'Orders with invalid tech numbers',
@.query = 'SELECT order_no, order_ext, line_no from epic..STG_BNERPT_INVALIDTECHNOS' ,
@.attach_query_result_as_file = 1 ;

Message Results...

Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 476
Query execution failed: Error initializing COM
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.

Investigating the sproc itself shows...


Line 476 in the sproc is the beginning of a 'trap'
--Raise an error it the query execution fails
-- This will only be the case when @.append_query_error is set to 0 (false)
IF( (@.RetErrorMsg IS NOT NULL) AND (@.exclude_query_output=0) )
BEGIN
RAISERROR(14661, -1, -1, @.RetErrorMsg)
END

RETURN (@.rc)
this is the last section of code in the sproc

I have a very similar issue.

When i execute the following everything work 100%.

EXEC msdb.dbo.sp_send_dbmail

@.profile_name = 'DBA Mail',

@.recipients = me@.whatever.co.za',

@.body = 'Test email from server using dbmail',

@.subject = 'Test email from server using dbmail',

@.query = 'SELECT TOP 1 * FROM TABLE A Order by AlertDTTM DESC' ;

As soon as i put this exact code in a trigger i get the following error:

Msg 22050, Level 16, State 1, Line 0

Error formatting query, probably invalid parameters

Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 478

Query execution failed: Error Intiailizing COM . CoInitialize failed with Hresult: 0x80010106

Anyone ?

Database mail not sending

I am using the sp_send_dbmail sp and all appears to go well with that. But SS does not seem to be attempting to send the mail.

However when I look at the entries in sysmail_mailitems the sent status is zero. There are no entries in sysmail_log.

I configured Database Mail via the wizard. I am using the Sept CTP.

What could be the problem?I do have the following information in my Sql Alert log:
Unable to start mail session [reason: No Mail Profile defined]

However there are two mail methods defined in 2005, Sql Mail and Database Mail. I have defined a default mail profile in Database Mail. I have define and test one in Sql Mail and it says it works.

Friday, February 24, 2012

Database Mail and Sent Items folder

We are using SQL2005 Database Mail and sending emails using our Exchange
Server as the smtp server. There is an account set up in exchange that
Database Mail uses and it works great.
However, is there a way to have all emails that that account sends put into
the "Sent Items" folder for that account?
Any assistance would be greatly appreciated.
Sincerely,
Glen WolinskyHello Glen,
You may want to bcc to this account and configure rule for the account when
receing mail from itself, it routed it to sent item folder.
Or, you may want to use SQL mail which uses MAPI so that Exchange will save
sent items automatically.
Since the issue is related to Exchange, you may also ask in Exchange
newsgroup so that you may get more qualified answer.
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Database Mail and Sent Items folder

We are using SQL2005 Database Mail and sending emails using our Exchange
Server as the smtp server. There is an account set up in exchange that
Database Mail uses and it works great.
However, is there a way to have all emails that that account sends put into
the "Sent Items" folder for that account?
Any assistance would be greatly appreciated.
Sincerely,
Glen WolinskyHello Glen,
You may want to bcc to this account and configure rule for the account when
receing mail from itself, it routed it to sent item folder.
Or, you may want to use SQL mail which uses MAPI so that Exchange will save
sent items automatically.
Since the issue is related to Exchange, you may also ask in Exchange
newsgroup so that you may get more qualified answer.
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, February 19, 2012

Database Mail

All,
I'm trying to test sending mail using SQL Server 2005. I have configured
database mail but I'm getting the following error:
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 10 (2007-02-13T12:38:53). Exception
Message: Could not connect to mail server. (An established connection was
aborted by the software in your host machine).
Has anyone ran into this. I have been able to setup the same thing on my
local machine and it works fine. Any suggestions would be appreciated.
JamalHi,
try sending a mail using the information entered in the GUI using the
telnet command. there should be a more specific error than the actual
posted.
http://www.activexperts.com/activemail/telnet/
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Jamal,
Any luck finding a solution? I'm getting the same error message.
Ron
"Jamal" wrote:

> All,
> I'm trying to test sending mail using SQL Server 2005. I have configured
> database mail but I'm getting the following error:
> The mail could not be sent to the recipients because of the mail server
> failure. (Sending Mail using Account 10 (2007-02-13T12:38:53). Exception
> Message: Could not connect to mail server. (An established connection was
> aborted by the software in your host machine).
> Has anyone ran into this. I have been able to setup the same thing on my
> local machine and it works fine. Any suggestions would be appreciated.
> Jamal
>
>|||Problem turned out to be that port 25 was blocked. In the VirusConsole
=> Access Protection => Prevent mass mailing worms from sending mail
Ports 25
Added these to the exception list
SQLWb.exe,MsDtsSrvr.exe,SQLAgent90.exe,DtsDebugHost.exe,DatabaseMail90.exe

Database Mail

All,
I'm trying to test sending mail using SQL Server 2005. I have configured
database mail but I'm getting the following error:
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 10 (2007-02-13T12:38:53). Exception
Message: Could not connect to mail server. (An established connection was
aborted by the software in your host machine).
Has anyone ran into this. I have been able to setup the same thing on my
local machine and it works fine. Any suggestions would be appreciated.
JamalHi,
try sending a mail using the information entered in the GUI using the
telnet command. there should be a more specific error than the actual
posted.
http://www.activexperts.com/activemail/telnet/
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Jamal,
Any luck finding a solution? I'm getting the same error message.
Ron
"Jamal" wrote:
> All,
> I'm trying to test sending mail using SQL Server 2005. I have configured
> database mail but I'm getting the following error:
> The mail could not be sent to the recipients because of the mail server
> failure. (Sending Mail using Account 10 (2007-02-13T12:38:53). Exception
> Message: Could not connect to mail server. (An established connection was
> aborted by the software in your host machine).
> Has anyone ran into this. I have been able to setup the same thing on my
> local machine and it works fine. Any suggestions would be appreciated.
> Jamal
>
>|||Problem turned out to be that port 25 was blocked. In the VirusConsole
=> Access Protection => Prevent mass mailing worms from sending mail
Ports 25
Added these to the exception list
SQLWb.exe,MsDtsSrvr.exe,SQLAgent90.exe,DtsDebugHost.exe,DatabaseMail90.exe

Database Mail

All,
I'm trying to test sending mail using SQL Server 2005. I have configured
database mail but I'm getting the following error:
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 10 (2007-02-13T12:38:53). Exception
Message: Could not connect to mail server. (An established connection was
aborted by the software in your host machine).
Has anyone ran into this. I have been able to setup the same thing on my
local machine and it works fine. Any suggestions would be appreciated.
Jamal
Hi,
try sending a mail using the information entered in the GUI using the
telnet command. there should be a more specific error than the actual
posted.
http://www.activexperts.com/activemail/telnet/
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Hi Jamal,
Any luck finding a solution? I'm getting the same error message.
Ron
"Jamal" wrote:

> All,
> I'm trying to test sending mail using SQL Server 2005. I have configured
> database mail but I'm getting the following error:
> The mail could not be sent to the recipients because of the mail server
> failure. (Sending Mail using Account 10 (2007-02-13T12:38:53). Exception
> Message: Could not connect to mail server. (An established connection was
> aborted by the software in your host machine).
> Has anyone ran into this. I have been able to setup the same thing on my
> local machine and it works fine. Any suggestions would be appreciated.
> Jamal
>
>
|||Problem turned out to be that port 25 was blocked. In the VirusConsole
=> Access Protection => Prevent mass mailing worms from sending mail
Ports 25
Added these to the exception list
SQLWb.exe,MsDtsSrvr.exe,SQLAgent90.exe,DtsDebugHos t.exe,DatabaseMail90.exe