Showing posts with label mail. Show all posts
Showing posts with label mail. Show all posts

Saturday, February 25, 2012

Database Mail: getting bounce info from Exchange?

Database Mail only sends SMTP email messages and logs problems
connecting to the mail server. However, I also need to log bounced
emails (bad address, etc).

Are there any clean ways to do this with Database Mail and Exchange?
Or will I have to mix Database Mail with SQL Mail to read bounces out
of the inbox? Or, have a .NET windows service that talks to the
Exchange API?"Manny Klystron" <manny.klystron@.gmail.comwrote in message
news:1177542209.460490.41620@.t39g2000prd.googlegro ups.com...

Quote:

Originally Posted by

Database Mail only sends SMTP email messages and logs problems
connecting to the mail server. However, I also need to log bounced
emails (bad address, etc).
>
Are there any clean ways to do this with Database Mail and Exchange?
Or will I have to mix Database Mail with SQL Mail to read bounces out
of the inbox? Or, have a .NET windows service that talks to the
Exchange API?


I'd have a separate API that handles this. It's not really a good duty for
SQL Server.

Quote:

Originally Posted by

>


--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

Database Mail: getting bounce info from Exchange?

Database Mail only sends SMTP email messages and logs problems
connecting to the mail server. However, I also need to log bounced
emails (bad address, etc).
Are there any clean ways to do this with Database Mail and Exchange?
Or will I have to mix Database Mail with SQL Mail to read bounces out
of the inbox? Or, have a .NET windows service that talks to the
Exchange API?
"Manny Klystron" <manny.klystron@.gmail.com> wrote in message
news:1177542209.460490.41620@.t39g2000prd.googlegro ups.com...
> Database Mail only sends SMTP email messages and logs problems
> connecting to the mail server. However, I also need to log bounced
> emails (bad address, etc).
> Are there any clean ways to do this with Database Mail and Exchange?
> Or will I have to mix Database Mail with SQL Mail to read bounces out
> of the inbox? Or, have a .NET windows service that talks to the
> Exchange API?
I'd have a separate API that handles this. It's not really a good duty for
SQL Server.

>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

Database Mail: getting bounce info from Exchange?

Database Mail only sends SMTP email messages and logs problems
connecting to the mail server. However, I also need to log bounced
emails (bad address, etc).
Are there any clean ways to do this with Database Mail and Exchange?
Or will I have to mix Database Mail with SQL Mail to read bounces out
of the inbox? Or, have a .NET windows service that talks to the
Exchange API?"Manny Klystron" <manny.klystron@.gmail.com> wrote in message
news:1177542209.460490.41620@.t39g2000prd.googlegroups.com...
> Database Mail only sends SMTP email messages and logs problems
> connecting to the mail server. However, I also need to log bounced
> emails (bad address, etc).
> Are there any clean ways to do this with Database Mail and Exchange?
> Or will I have to mix Database Mail with SQL Mail to read bounces out
> of the inbox? Or, have a .NET windows service that talks to the
> Exchange API?
I'd have a separate API that handles this. It's not really a good duty for
SQL Server.
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

Database Mail: getting bounce info from Exchange?

Database Mail only sends SMTP email messages and logs problems
connecting to the mail server. However, I also need to log bounced
emails (bad address, etc).
Are there any clean ways to do this with Database Mail and Exchange?
Or will I have to mix Database Mail with SQL Mail to read bounces out
of the inbox? Or, have a .NET windows service that talks to the
Exchange API?"Manny Klystron" <manny.klystron@.gmail.com> wrote in message
news:1177542209.460490.41620@.t39g2000prd.googlegroups.com...
> Database Mail only sends SMTP email messages and logs problems
> connecting to the mail server. However, I also need to log bounced
> emails (bad address, etc).
> Are there any clean ways to do this with Database Mail and Exchange?
> Or will I have to mix Database Mail with SQL Mail to read bounces out
> of the inbox? Or, have a .NET windows service that talks to the
> Exchange API?
I'd have a separate API that handles this. It's not really a good duty for
SQL Server.

>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

database mail XPs

hello
i want to know the meaning of XPs?
thank you
Extended Stored Procedure. Something writem in a compiled language that
creates a .dll file that you must register in SQL Server before you can use
it.
"test windows" <testwindows@.discussions.microsoft.com> wrote in message
news:48A67541-5B92-4207-A1A8-9C89E499F4E8@.microsoft.com...
> hello
> i want to know the meaning of XPs?
> thank you

database mail XPs

hello
i want to know the meaning of XPs'
thank youExtended Stored Procedure. Something writem in a compiled language that
creates a .dll file that you must register in SQL Server before you can use
it.
"test windows" <testwindows@.discussions.microsoft.com> wrote in message
news:48A67541-5B92-4207-A1A8-9C89E499F4E8@.microsoft.com...
> hello
> i want to know the meaning of XPs'
> thank you

database mail XPs

hello
i want to know the meaning of XPs'
thank youExtended Stored Procedure. Something writem in a compiled language that
creates a .dll file that you must register in SQL Server before you can use
it.
"test windows" <testwindows@.discussions.microsoft.com> wrote in message
news:48A67541-5B92-4207-A1A8-9C89E499F4E8@.microsoft.com...
> hello
> i want to know the meaning of XPs'
> thank you

Database Mail Works Locally but not from Web

I'm building a web site in Visual Web Developer Express on a SQL Server 2005 Developer Edition database, on XP Pro with IIS 5.1 up and running.

Database Mail is configured and works well from the VWD environment. I can launch the site locally from VWD and the stored procedures that call the database mail functions execute perfectly.

However, when I copy the site from the development folder under VWD to my IIS default web page, nothing is ever generated from database mail. I can open the site in IIS and everything looks like it's responding correctly (data updates, refreshes etc) but the behind-the-scenes processes that should be generating email traffic don't do anything.

Review of the database mail log through SQL Server Management Studio shows no activity at all during the timeframe of the "on line" IIS sessions, so it appears that the process isn't hearing anything calling it (or is ignoring the calls if they are happening).

Why would it work in one environment and not another on the same machine? Is there a setup configuration or permissions issue that I've missed somewhere?

Thanks in advance.

I suggest it is a permissions thing. I suggest this is asked in the development forums, in how to conifgure your website to talk to your database with the correct permissions.|||

You were correct, the sp_send_dbmail SPROC used by my stored procedure resides in the MSDB database. The default configuration does not include the ASPNET account with any permissions. Once I found the SPROC and granted Execute permission to ASPNET, everything started working as intended. It's magic!

database mail Vs. xp_smtp_sendmail

Hi,
we are in the process of upgrading SQL Server 2000 to 2005,
Now, a lot of emails are sent within stored procedures using
xp_smtp_sendmail.
Now this procedure is quite nice because it lets the caller
define diffrent From names and ReplyTo depending on certain conditions.
Since I can't reuse this procedure in SQL 2005, I am testing the
Database Mail using the sp_send_dbmail stored procedure along with
some profiles I created. It works great, but...
My problem here is that sp_send_dbmail doesn't let you dynamically change
the FROM and REPLYTO parameters, it uses the ones on the profile
sp_send_dbmail
recieves in parameter. This leaves me with a dilemna because the from and
replyTo
adresses possibility are too great (that is why it was made dynamic in our
SQL 2000 using xp_smtp_sendmail)
How should I proceed if I do not want to create 1 profile per possibility?
Is there another way or another SMTP send mail procedure or technique I
could use in SQL 2005
that will allow me to do the same thing as in XP_smtp_SendMail ?
Ideas anyone ?
Thanks
> Since I can't reuse this procedure in SQL 2005
Why not? As long as you are on 32-bit, you can install the DLL on 2005 the
same way you did on 2000.
A
|||Thanks, But it is a x64 bit SQL Server..
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%230invczaHHA.960@.TK2MSFTNGP03.phx.gbl...
> You should be able to use xp_smtp in 2005, as long as it is 32 bit SQL
> Server.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "msnews.microsoft.com" <spam@.spam.com> wrote in message
> news:e8h4gUzaHHA.5020@.TK2MSFTNGP05.phx.gbl...
>
|||> Thanks, But it is a x64 bit SQL Server..
In that case, you could learn the format and write a stored procedure that
creates a properly-formatted text file with a .msg extension and drops it
into the pickup folder of a local SMTP server (which doesn't necessarily
have to live on the same server, so could be 32-bit). This would allow you
to have full control over FROM/REPLYTO etc.
Another option is to set up a 32-bit edition of Express or Workgroup on
another server (even a web server), and route messages through it. As long
as the network path is reliable, not a huge difference between 'EXEC
master.dbo.xp_smtp_sendmail' and 'EXEC
linked_server_name.master.dbo.xp_smtp_sendmail'...
A
|||BTW, I submitted an enhancement request about this issue. You can vote on
it if you have a passport and feel strongly enough about it to have it
addressed in a future version of SQL Server:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=264498
A

database mail Vs. xp_smtp_sendmail

Hi,
we are in the process of upgrading SQL Server 2000 to 2005,
Now, a lot of emails are sent within stored procedures using
xp_smtp_sendmail.
Now this procedure is quite nice because it lets the caller
define diffrent From names and ReplyTo depending on certain conditions.
Since I can't reuse this procedure in SQL 2005, I am testing the
Database Mail using the sp_send_dbmail stored procedure along with
some profiles I created. It works great, but...
My problem here is that sp_send_dbmail doesn't let you dynamically change
the FROM and REPLYTO parameters, it uses the ones on the profile
sp_send_dbmail
recieves in parameter. This leaves me with a dilemna because the from and
replyTo
adresses possibility are too great (that is why it was made dynamic in our
SQL 2000 using xp_smtp_sendmail)
How should I proceed if I do not want to create 1 profile per possibility?
Is there another way or another SMTP send mail procedure or technique I
could use in SQL 2005
that will allow me to do the same thing as in XP_smtp_SendMail ?
Ideas anyone ?
Thanks> Since I can't reuse this procedure in SQL 2005
Why not? As long as you are on 32-bit, you can install the DLL on 2005 the
same way you did on 2000.
A|||> Since I can't reuse this procedure in SQL 2005, I am testing the
You should be able to use xp_smtp in 2005, as long as it is 32 bit SQL Serve
r.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"msnews.microsoft.com" <spam@.spam.com> wrote in message
news:e8h4gUzaHHA.5020@.TK2MSFTNGP05.phx.gbl...
> Hi,
> we are in the process of upgrading SQL Server 2000 to 2005,
> Now, a lot of emails are sent within stored procedures using
> xp_smtp_sendmail.
> Now this procedure is quite nice because it lets the caller
> define diffrent From names and ReplyTo depending on certain conditions.
>
> Since I can't reuse this procedure in SQL 2005, I am testing the
> Database Mail using the sp_send_dbmail stored procedure along with
> some profiles I created. It works great, but...
>
> My problem here is that sp_send_dbmail doesn't let you dynamically change
> the FROM and REPLYTO parameters, it uses the ones on the profile
> sp_send_dbmail
> recieves in parameter. This leaves me with a dilemna because the from and
> replyTo
> adresses possibility are too great (that is why it was made dynamic in our
> SQL 2000 using xp_smtp_sendmail)
>
> How should I proceed if I do not want to create 1 profile per possibility?
> Is there another way or another SMTP send mail procedure or technique I
> could use in SQL 2005
> that will allow me to do the same thing as in XP_smtp_SendMail ?
>
> Ideas anyone ?
>
> Thanks
>
>|||Thanks, But it is a x64 bit SQL Server..
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%230invczaHHA.960@.TK2MSFTNGP03.phx.gbl...
> You should be able to use xp_smtp in 2005, as long as it is 32 bit SQL
> Server.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "msnews.microsoft.com" <spam@.spam.com> wrote in message
> news:e8h4gUzaHHA.5020@.TK2MSFTNGP05.phx.gbl...
>|||> Thanks, But it is a x64 bit SQL Server..
Well, you can't use a 32 bit DLL in 64 bit code. See Russell's reply to Fred
's post for suggestion.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"msnews.microsoft.com" <spam@.spam.com> wrote in message
news:euuEqS8aHHA.1508@.TK2MSFTNGP06.phx.gbl...
> Thanks, But it is a x64 bit SQL Server..
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:%230invczaHHA.960@.TK2MSFTNGP03.phx.gbl...
>|||> Thanks, But it is a x64 bit SQL Server..
In that case, you could learn the format and write a stored procedure that
creates a properly-formatted text file with a .msg extension and drops it
into the pickup folder of a local SMTP server (which doesn't necessarily
have to live on the same server, so could be 32-bit). This would allow you
to have full control over FROM/REPLYTO etc.
Another option is to set up a 32-bit edition of Express or Workgroup on
another server (even a web server), and route messages through it. As long
as the network path is reliable, not a huge difference between 'EXEC
master.dbo.xp_smtp_sendmail' and 'EXEC
linked_server_name.master.dbo.xp_smtp_sendmail'...
A|||BTW, I submitted an enhancement request about this issue. You can vote on
it if you have a passport and feel strongly enough about it to have it
addressed in a future version of SQL Server:
https://connect.microsoft.com/SQLSe...=2644
98
A

database mail Vs. xp_smtp_sendmail

Hi,
we are in the process of upgrading SQL Server 2000 to 2005,
Now, a lot of emails are sent within stored procedures using
xp_smtp_sendmail.
Now this procedure is quite nice because it lets the caller
define diffrent From names and ReplyTo depending on certain conditions.
Since I can't reuse this procedure in SQL 2005, I am testing the
Database Mail using the sp_send_dbmail stored procedure along with
some profiles I created. It works great, but...
My problem here is that sp_send_dbmail doesn't let you dynamically change
the FROM and REPLYTO parameters, it uses the ones on the profile
sp_send_dbmail
recieves in parameter. This leaves me with a dilemna because the from and
replyTo
adresses possibility are too great (that is why it was made dynamic in our
SQL 2000 using xp_smtp_sendmail)
How should I proceed if I do not want to create 1 profile per possibility?
Is there another way or another SMTP send mail procedure or technique I
could use in SQL 2005
that will allow me to do the same thing as in XP_smtp_SendMail ?
Ideas anyone ?
Thanks> Since I can't reuse this procedure in SQL 2005
Why not? As long as you are on 32-bit, you can install the DLL on 2005 the
same way you did on 2000.
A|||> Since I can't reuse this procedure in SQL 2005, I am testing the
You should be able to use xp_smtp in 2005, as long as it is 32 bit SQL Server.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"msnews.microsoft.com" <spam@.spam.com> wrote in message
news:e8h4gUzaHHA.5020@.TK2MSFTNGP05.phx.gbl...
> Hi,
> we are in the process of upgrading SQL Server 2000 to 2005,
> Now, a lot of emails are sent within stored procedures using
> xp_smtp_sendmail.
> Now this procedure is quite nice because it lets the caller
> define diffrent From names and ReplyTo depending on certain conditions.
>
> Since I can't reuse this procedure in SQL 2005, I am testing the
> Database Mail using the sp_send_dbmail stored procedure along with
> some profiles I created. It works great, but...
>
> My problem here is that sp_send_dbmail doesn't let you dynamically change
> the FROM and REPLYTO parameters, it uses the ones on the profile
> sp_send_dbmail
> recieves in parameter. This leaves me with a dilemna because the from and
> replyTo
> adresses possibility are too great (that is why it was made dynamic in our
> SQL 2000 using xp_smtp_sendmail)
>
> How should I proceed if I do not want to create 1 profile per possibility?
> Is there another way or another SMTP send mail procedure or technique I
> could use in SQL 2005
> that will allow me to do the same thing as in XP_smtp_SendMail ?
>
> Ideas anyone ?
>
> Thanks
>
>|||Thanks, But it is a x64 bit SQL Server..
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%230invczaHHA.960@.TK2MSFTNGP03.phx.gbl...
>> Since I can't reuse this procedure in SQL 2005, I am testing the
> You should be able to use xp_smtp in 2005, as long as it is 32 bit SQL
> Server.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "msnews.microsoft.com" <spam@.spam.com> wrote in message
> news:e8h4gUzaHHA.5020@.TK2MSFTNGP05.phx.gbl...
>> Hi,
>> we are in the process of upgrading SQL Server 2000 to 2005,
>> Now, a lot of emails are sent within stored procedures using
>> xp_smtp_sendmail.
>> Now this procedure is quite nice because it lets the caller
>> define diffrent From names and ReplyTo depending on certain conditions.
>>
>> Since I can't reuse this procedure in SQL 2005, I am testing the
>> Database Mail using the sp_send_dbmail stored procedure along with
>> some profiles I created. It works great, but...
>>
>> My problem here is that sp_send_dbmail doesn't let you dynamically change
>> the FROM and REPLYTO parameters, it uses the ones on the profile
>> sp_send_dbmail
>> recieves in parameter. This leaves me with a dilemna because the from
>> and
>> replyTo
>> adresses possibility are too great (that is why it was made dynamic in
>> our
>> SQL 2000 using xp_smtp_sendmail)
>>
>> How should I proceed if I do not want to create 1 profile per
>> possibility?
>> Is there another way or another SMTP send mail procedure or technique I
>> could use in SQL 2005
>> that will allow me to do the same thing as in XP_smtp_SendMail ?
>>
>> Ideas anyone ?
>>
>> Thanks
>>
>>
>|||> Thanks, But it is a x64 bit SQL Server..
Well, you can't use a 32 bit DLL in 64 bit code. See Russell's reply to Fred's post for suggestion.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"msnews.microsoft.com" <spam@.spam.com> wrote in message
news:euuEqS8aHHA.1508@.TK2MSFTNGP06.phx.gbl...
> Thanks, But it is a x64 bit SQL Server..
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:%230invczaHHA.960@.TK2MSFTNGP03.phx.gbl...
>> Since I can't reuse this procedure in SQL 2005, I am testing the
>> You should be able to use xp_smtp in 2005, as long as it is 32 bit SQL Server.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "msnews.microsoft.com" <spam@.spam.com> wrote in message
>> news:e8h4gUzaHHA.5020@.TK2MSFTNGP05.phx.gbl...
>> Hi,
>> we are in the process of upgrading SQL Server 2000 to 2005,
>> Now, a lot of emails are sent within stored procedures using
>> xp_smtp_sendmail.
>> Now this procedure is quite nice because it lets the caller
>> define diffrent From names and ReplyTo depending on certain conditions.
>>
>> Since I can't reuse this procedure in SQL 2005, I am testing the
>> Database Mail using the sp_send_dbmail stored procedure along with
>> some profiles I created. It works great, but...
>>
>> My problem here is that sp_send_dbmail doesn't let you dynamically change
>> the FROM and REPLYTO parameters, it uses the ones on the profile
>> sp_send_dbmail
>> recieves in parameter. This leaves me with a dilemna because the from and
>> replyTo
>> adresses possibility are too great (that is why it was made dynamic in our
>> SQL 2000 using xp_smtp_sendmail)
>>
>> How should I proceed if I do not want to create 1 profile per possibility?
>> Is there another way or another SMTP send mail procedure or technique I
>> could use in SQL 2005
>> that will allow me to do the same thing as in XP_smtp_SendMail ?
>>
>> Ideas anyone ?
>>
>> Thanks
>>
>>
>|||> Thanks, But it is a x64 bit SQL Server..
In that case, you could learn the format and write a stored procedure that
creates a properly-formatted text file with a .msg extension and drops it
into the pickup folder of a local SMTP server (which doesn't necessarily
have to live on the same server, so could be 32-bit). This would allow you
to have full control over FROM/REPLYTO etc.
Another option is to set up a 32-bit edition of Express or Workgroup on
another server (even a web server), and route messages through it. As long
as the network path is reliable, not a huge difference between 'EXEC
master.dbo.xp_smtp_sendmail' and 'EXEC
linked_server_name.master.dbo.xp_smtp_sendmail'...
A|||BTW, I submitted an enhancement request about this issue. You can vote on
it if you have a passport and feel strongly enough about it to have it
addressed in a future version of SQL Server:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=264498
A

Database Mail vs. SQL Mail

Since SQL Mail is being deprecated, will Database Mail in SQL Server 2008 have the capability of RECEIVING mail? I have several apps which require that functionality.

maghick wrote:

Since SQL Mail is being deprecated


SQL Mail will still be available in SQL Server 2008.

maghick wrote:

will Database Mail in SQL Server 2008 have the capability of RECEIVING mail?


Database Mail will not likely have this in SQL Server 2008.

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server
http://blogs.msdn.com/sqlrem/

database mail to send mail to multiple recipient from table

I am using database mail to send emails to our Lotus Notes SMTP server using sp_send_dbmail. I want to accomplish the following.

I have maintained department-wise users email address in one table . Now I want to send mail to one particular department and there can be 1-15 users as recipient for that mail. How can I do that using sp_send_dbmail?

Well, I have found answer to it. The following way, we can accomplish. Hope that will help those, who are searching for something similar.

DECLARE @.email VARCHAR(4000)
SET @.email = ''
SELECT @.email = RTRIM(@.email) + RTRIM(email) + ';'
FROM Users
WHERE email <> '' AND DepCode = 'A'
PRINT @.email

EXECUTE msdb.dbo.sysmail_add_account_sp
@.account_name = 'custoerders',
@.description = 'Customer Address Account',
@.email_address = @.email
@.mailserver_name = 'mail.anywhere.com'

database mail to send mail to multiple recipient from table

I am using database mail to send emails to our Lotus Notes SMTP server using sp_send_dbmail. I want to accomplish the following.

I have maintained department-wise users email address in one table . Now I want to send mail to one particular department and there can be 1-15 users as recipient for that mail. How can I do that using sp_send_dbmail?

Well, I have found answer to it. The following way, we can accomplish. Hope that will help those, who are searching for something similar.

DECLARE @.email VARCHAR(4000)
SET @.email = ''
SELECT @.email = RTRIM(@.email) + RTRIM(email) + ';'
FROM Users
WHERE email <> '' AND DepCode = 'A'
PRINT @.email

EXECUTE msdb.dbo.sysmail_add_account_sp
@.account_name = 'custoerders',
@.description = 'Customer Address Account',
@.email_address = @.email
@.mailserver_name = 'mail.anywhere.com'

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 stops working on SQL 2005

We've encountered a problem on several SQL 2005 installations where
database mail completely stops working for no reason. Has anyone else
encountered this? This only affects calls to sp_send_dbmail and job
alerts, etc. When I right-click DBMail in SSMS and choose Send Test
Email - that one works. But none of the stuff that actually WANT to
work. Any help would be appreciated. No errors anywhere - just the
message never arrives.
Did sp_send_dbmail ever work? Did you enable service broker in the msdb database?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"CoreyB" <unc27932@.yahoo.com> wrote in message
news:1142005500.961901.109950@.j33g2000cwa.googlegr oups.com...
> We've encountered a problem on several SQL 2005 installations where
> database mail completely stops working for no reason. Has anyone else
> encountered this? This only affects calls to sp_send_dbmail and job
> alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> Email - that one works. But none of the stuff that actually WANT to
> work. Any help would be appreciated. No errors anywhere - just the
> message never arrives.
>
|||Yes - we were using sp_send_dbmail in our SPs and they were running
great. Then they just stopped working - or should I say stopped
delivering. The status in the sys tables say that the messages were
sent. I've done the all the checks found on MS troubleshooting
page...
http://msdn2.microsoft.com/en-US/library/ms189959(SQL.90).aspx
This included checking to be sure service broker was enabled, which it
was, and dbmail was started. I'm fairly confident it's not the SMTP
server b/c the manual test in the GUI of SSMS works fine.
|||Can you run these statements and post back the result?
select count(*) from msdb.dbo.InternalMailQueue
select count(*) from msdb.dbo.ExternalMailQueue
select count(*) from msdb.sys.transmission_queue
select distinct transmission_status from msdb.sys.transmission_queue
select sq.name,qm.* from sys.dm_broker_queue_monitors qm
join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
where database_id = db_id('msdb')
This posting is provided "AS IS" with no warranties, and confers no rights.
HTH,
~ Remus Rusanu
SQL Service Broker
http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx
"CoreyB" <unc27932@.yahoo.com> wrote in message
news:1142005500.961901.109950@.j33g2000cwa.googlegr oups.com...
> We've encountered a problem on several SQL 2005 installations where
> database mail completely stops working for no reason. Has anyone else
> encountered this? This only affects calls to sp_send_dbmail and job
> alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> Email - that one works. But none of the stuff that actually WANT to
> work. Any help would be appreciated. No errors anywhere - just the
> message never arrives.
>
|||Here are the results of those SQL statements...
select count(*) from msdb.dbo.InternalMailQueue
0
select count(*) from msdb.dbo.ExternalMailQueue
0
select count(*) from msdb.sys.transmission_queue
0
select distinct transmission_status from msdb.sys.transmission_queue
No Rows Returned
select sq.name,qm.* from sys.dm_broker_queue_monitors qm
join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
where database_id = db_id('msdb')
InternalMailQueue4843150049INACTIVE2006-03-10
16:29:19.9972006-03-10 16:29:19.9830
ExternalMailQueue4875150163INACTIVE2006-03-10
16:39:19.9572006-03-10 16:24:42.2430
Remus Rusanu [MSFT] wrote:[vbcol=seagreen]
> Can you run these statements and post back the result?
> select count(*) from msdb.dbo.InternalMailQueue
> select count(*) from msdb.dbo.ExternalMailQueue
> select count(*) from msdb.sys.transmission_queue
> select distinct transmission_status from msdb.sys.transmission_queue
> select sq.name,qm.* from sys.dm_broker_queue_monitors qm
> join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
> where database_id = db_id('msdb')
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> HTH,
> ~ Remus Rusanu
> SQL Service Broker
> http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx
>
> "CoreyB" <unc27932@.yahoo.com> wrote in message
> news:1142005500.961901.109950@.j33g2000cwa.googlegr oups.com...
|||I'm still hoping someone might know about this...anyone?
CoreyB wrote:[vbcol=seagreen]
> Here are the results of those SQL statements...
> select count(*) from msdb.dbo.InternalMailQueue
> 0
> select count(*) from msdb.dbo.ExternalMailQueue
> 0
> select count(*) from msdb.sys.transmission_queue
> 0
> select distinct transmission_status from msdb.sys.transmission_queue
> No Rows Returned
>
> select sq.name,qm.* from sys.dm_broker_queue_monitors qm
> join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
> where database_id = db_id('msdb')
> InternalMailQueue4843150049INACTIVE2006-03-10
> 16:29:19.9972006-03-10 16:29:19.9830
> ExternalMailQueue4875150163INACTIVE2006-03-10
> 16:39:19.9572006-03-10 16:24:42.2430
>
> Remus Rusanu [MSFT] wrote:
|||CoreyB,
I had similar symptoms but not identical. Database Mail stopped
working unexpectedly including send test email as well as alerts.
Also, database mail log had no activity since a couple of days ago when
it stopped working. I had 37 messages unsent.
I double-checked the following:
1. database mail enabled via surface configuration
2. proper agent and profiles setup
3. service broker message delivery activated
4. database mail in mail host database started
All looked good so far...
5. messages stuck in queue -- yes, 37 total 6. status of messages in
queue -- status "unsent" which traces back to problem with database
mail configuration or external program not getting called for some
reason.
So I basically navigated to location of databasemail90.exe and
double-clicked to run manually and viola, messages started flowing.
However, CMD window stayed open longer than expected so I closed
abruptly.
After this, Step 4 above, "database mail started" now showed status of
"stopped". I ran a command in SQL studio to restart and now things
worked as expected -- mail flowing without me having to double-click
anything.
In summary, my observation is that the external program,
databasemail90.exe was in a "bad state" and required me to kick start
it manually.
http://msdn2.microsoft.com/en-US/library/ms189959(SQL.90).aspx
Here is relevant SQL obtained from MSDN troubleshooting guides if
anyone is interested:
--check to see if service broker is enabled SELECT is_broker_enabled
FROM sys.databases WHERE name = 'msdb' ;
--check to see if database mail is started in msdb database use msdb go
EXECUTE dbo.sysmail_help_status_sp ;
--start database mail if necessary
EXECUTE dbo.sysmail_start_sp ;
--check status of mail queue
sysmail_help_queue_sp @.queue_type = 'Mail' ;
--check database mail event log
select * from sysmail_event_log
--check database mail queue for status of all items select * from
sysmail_allitems
select * from sysmail_allitems

Database Mail stops working on SQL 2005

We've encountered a problem on several SQL 2005 installations where
database mail completely stops working for no reason. Has anyone else
encountered this? This only affects calls to sp_send_dbmail and job
alerts, etc. When I right-click DBMail in SSMS and choose Send Test
Email - that one works. But none of the stuff that actually WANT to
work. Any help would be appreciated. No errors anywhere - just the
message never arrives.Did sp_send_dbmail ever work? Did you enable service broker in the msdb database?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"CoreyB" <unc27932@.yahoo.com> wrote in message
news:1142005500.961901.109950@.j33g2000cwa.googlegroups.com...
> We've encountered a problem on several SQL 2005 installations where
> database mail completely stops working for no reason. Has anyone else
> encountered this? This only affects calls to sp_send_dbmail and job
> alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> Email - that one works. But none of the stuff that actually WANT to
> work. Any help would be appreciated. No errors anywhere - just the
> message never arrives.
>|||Yes - we were using sp_send_dbmail in our SPs and they were running
great. Then they just stopped working - or should I say stopped
delivering. The status in the sys tables say that the messages were
sent. I've done the all the checks found on MS troubleshooting
page...
http://msdn2.microsoft.com/en-US/library/ms189959(SQL.90).aspx
This included checking to be sure service broker was enabled, which it
was, and dbmail was started. I'm fairly confident it's not the SMTP
server b/c the manual test in the GUI of SSMS works fine.|||Can you run these statements and post back the result?
select count(*) from msdb.dbo.InternalMailQueue
select count(*) from msdb.dbo.ExternalMailQueue
select count(*) from msdb.sys.transmission_queue
select distinct transmission_status from msdb.sys.transmission_queue
select sq.name,qm.* from sys.dm_broker_queue_monitors qm
join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
where database_id = db_id('msdb')
--
This posting is provided "AS IS" with no warranties, and confers no rights.
HTH,
~ Remus Rusanu
SQL Service Broker
http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx
"CoreyB" <unc27932@.yahoo.com> wrote in message
news:1142005500.961901.109950@.j33g2000cwa.googlegroups.com...
> We've encountered a problem on several SQL 2005 installations where
> database mail completely stops working for no reason. Has anyone else
> encountered this? This only affects calls to sp_send_dbmail and job
> alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> Email - that one works. But none of the stuff that actually WANT to
> work. Any help would be appreciated. No errors anywhere - just the
> message never arrives.
>|||Here are the results of those SQL statements...
select count(*) from msdb.dbo.InternalMailQueue
0
select count(*) from msdb.dbo.ExternalMailQueue
0
select count(*) from msdb.sys.transmission_queue
0
select distinct transmission_status from msdb.sys.transmission_queue
No Rows Returned
select sq.name,qm.* from sys.dm_broker_queue_monitors qm
join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
where database_id = db_id('msdb')
InternalMailQueue 4 843150049 INACTIVE 2006-03-10
16:29:19.997 2006-03-10 16:29:19.983 0
ExternalMailQueue 4 875150163 INACTIVE 2006-03-10
16:39:19.957 2006-03-10 16:24:42.243 0
Remus Rusanu [MSFT] wrote:
> Can you run these statements and post back the result?
> select count(*) from msdb.dbo.InternalMailQueue
> select count(*) from msdb.dbo.ExternalMailQueue
> select count(*) from msdb.sys.transmission_queue
> select distinct transmission_status from msdb.sys.transmission_queue
> select sq.name,qm.* from sys.dm_broker_queue_monitors qm
> join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
> where database_id = db_id('msdb')
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> HTH,
> ~ Remus Rusanu
> SQL Service Broker
> http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx
>
> "CoreyB" <unc27932@.yahoo.com> wrote in message
> news:1142005500.961901.109950@.j33g2000cwa.googlegroups.com...
> > We've encountered a problem on several SQL 2005 installations where
> > database mail completely stops working for no reason. Has anyone else
> > encountered this? This only affects calls to sp_send_dbmail and job
> > alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> > Email - that one works. But none of the stuff that actually WANT to
> > work. Any help would be appreciated. No errors anywhere - just the
> > message never arrives.
> >|||I'm still hoping someone might know about this...anyone'
CoreyB wrote:
> Here are the results of those SQL statements...
> select count(*) from msdb.dbo.InternalMailQueue
> 0
> select count(*) from msdb.dbo.ExternalMailQueue
> 0
> select count(*) from msdb.sys.transmission_queue
> 0
> select distinct transmission_status from msdb.sys.transmission_queue
> No Rows Returned
>
> select sq.name,qm.* from sys.dm_broker_queue_monitors qm
> join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
> where database_id = db_id('msdb')
> InternalMailQueue 4 843150049 INACTIVE 2006-03-10
> 16:29:19.997 2006-03-10 16:29:19.983 0
> ExternalMailQueue 4 875150163 INACTIVE 2006-03-10
> 16:39:19.957 2006-03-10 16:24:42.243 0
>
> Remus Rusanu [MSFT] wrote:
> > Can you run these statements and post back the result?
> >
> > select count(*) from msdb.dbo.InternalMailQueue
> > select count(*) from msdb.dbo.ExternalMailQueue
> > select count(*) from msdb.sys.transmission_queue
> > select distinct transmission_status from msdb.sys.transmission_queue
> >
> > select sq.name,qm.* from sys.dm_broker_queue_monitors qm
> > join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
> > where database_id = db_id('msdb')
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> > HTH,
> > ~ Remus Rusanu
> >
> > SQL Service Broker
> > http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx
> >
> >
> > "CoreyB" <unc27932@.yahoo.com> wrote in message
> > news:1142005500.961901.109950@.j33g2000cwa.googlegroups.com...
> > > We've encountered a problem on several SQL 2005 installations where
> > > database mail completely stops working for no reason. Has anyone else
> > > encountered this? This only affects calls to sp_send_dbmail and job
> > > alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> > > Email - that one works. But none of the stuff that actually WANT to
> > > work. Any help would be appreciated. No errors anywhere - just the
> > > message never arrives.
> > >|||CoreyB,
I had similar symptoms but not identical. Database Mail stopped
working unexpectedly including send test email as well as alerts.
Also, database mail log had no activity since a couple of days ago when
it stopped working. I had 37 messages unsent.
I double-checked the following:
1. database mail enabled via surface configuration
2. proper agent and profiles setup
3. service broker message delivery activated
4. database mail in mail host database started
All looked good so far...
5. messages stuck in queue -- yes, 37 total 6. status of messages in
queue -- status "unsent" which traces back to problem with database
mail configuration or external program not getting called for some
reason.
So I basically navigated to location of databasemail90.exe and
double-clicked to run manually and viola, messages started flowing.
However, CMD window stayed open longer than expected so I closed
abruptly.
After this, Step 4 above, "database mail started" now showed status of
"stopped". I ran a command in SQL studio to restart and now things
worked as expected -- mail flowing without me having to double-click
anything.
In summary, my observation is that the external program,
databasemail90.exe was in a "bad state" and required me to kick start
it manually.
http://msdn2.microsoft.com/en-US/library/ms189959(SQL.90).aspx
Here is relevant SQL obtained from MSDN troubleshooting guides if
anyone is interested:
--check to see if service broker is enabled SELECT is_broker_enabled
FROM sys.databases WHERE name = 'msdb' ;
--check to see if database mail is started in msdb database use msdb go
EXECUTE dbo.sysmail_help_status_sp ;
--start database mail if necessary
EXECUTE dbo.sysmail_start_sp ;
--check status of mail queue
sysmail_help_queue_sp @.queue_type = 'Mail' ;
--check database mail event log
select * from sysmail_event_log
--check database mail queue for status of all items select * from
sysmail_allitems
select * from sysmail_allitems

Database Mail stops working on SQL 2005

We've encountered a problem on several SQL 2005 installations where
database mail completely stops working for no reason. Has anyone else
encountered this? This only affects calls to sp_send_dbmail and job
alerts, etc. When I right-click DBMail in SSMS and choose Send Test
Email - that one works. But none of the stuff that actually WANT to
work. Any help would be appreciated. No errors anywhere - just the
message never arrives.Did sp_send_dbmail ever work? Did you enable service broker in the msdb data
base?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"CoreyB" <unc27932@.yahoo.com> wrote in message
news:1142005500.961901.109950@.j33g2000cwa.googlegroups.com...
> We've encountered a problem on several SQL 2005 installations where
> database mail completely stops working for no reason. Has anyone else
> encountered this? This only affects calls to sp_send_dbmail and job
> alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> Email - that one works. But none of the stuff that actually WANT to
> work. Any help would be appreciated. No errors anywhere - just the
> message never arrives.
>|||Yes - we were using sp_send_dbmail in our SPs and they were running
great. Then they just stopped working - or should I say stopped
delivering. The status in the sys tables say that the messages were
sent. I've done the all the checks found on MS troubleshooting
page...
http://msdn2.microsoft.com/en-US/library/ms189959(SQL.90).aspx
This included checking to be sure service broker was enabled, which it
was, and dbmail was started. I'm fairly confident it's not the SMTP
server b/c the manual test in the GUI of SSMS works fine.|||Can you run these statements and post back the result?
select count(*) from msdb.dbo.InternalMailQueue
select count(*) from msdb.dbo.ExternalMailQueue
select count(*) from msdb.sys.transmission_queue
select distinct transmission_status from msdb.sys.transmission_queue
select sq.name,qm.* from sys.dm_broker_queue_monitors qm
join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
where database_id = db_id('msdb')
This posting is provided "AS IS" with no warranties, and confers no rights.
HTH,
~ Remus Rusanu
SQL Service Broker
http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx
"CoreyB" <unc27932@.yahoo.com> wrote in message
news:1142005500.961901.109950@.j33g2000cwa.googlegroups.com...
> We've encountered a problem on several SQL 2005 installations where
> database mail completely stops working for no reason. Has anyone else
> encountered this? This only affects calls to sp_send_dbmail and job
> alerts, etc. When I right-click DBMail in SSMS and choose Send Test
> Email - that one works. But none of the stuff that actually WANT to
> work. Any help would be appreciated. No errors anywhere - just the
> message never arrives.
>|||Here are the results of those SQL statements...
select count(*) from msdb.dbo.InternalMailQueue
0
select count(*) from msdb.dbo.ExternalMailQueue
0
select count(*) from msdb.sys.transmission_queue
0
select distinct transmission_status from msdb.sys.transmission_queue
No Rows Returned
select sq.name,qm.* from sys.dm_broker_queue_monitors qm
join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
where database_id = db_id('msdb')
InternalMailQueue 4 843150049 INACTIVE 2
006-03-10
16:29:19.997 2006-03-10 16:29:19.983 0
ExternalMailQueue 4 875150163 INACTIVE 2
006-03-10
16:39:19.957 2006-03-10 16:24:42.243 0
Remus Rusanu [MSFT] wrote:[vbcol=seagreen]
> Can you run these statements and post back the result?
> select count(*) from msdb.dbo.InternalMailQueue
> select count(*) from msdb.dbo.ExternalMailQueue
> select count(*) from msdb.sys.transmission_queue
> select distinct transmission_status from msdb.sys.transmission_queue
> select sq.name,qm.* from sys.dm_broker_queue_monitors qm
> join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
> where database_id = db_id('msdb')
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> HTH,
> ~ Remus Rusanu
> SQL Service Broker
> http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx
>
> "CoreyB" <unc27932@.yahoo.com> wrote in message
> news:1142005500.961901.109950@.j33g2000cwa.googlegroups.com...|||I'm still hoping someone might know about this...anyone'
CoreyB wrote:[vbcol=seagreen]
> Here are the results of those SQL statements...
> select count(*) from msdb.dbo.InternalMailQueue
> 0
> select count(*) from msdb.dbo.ExternalMailQueue
> 0
> select count(*) from msdb.sys.transmission_queue
> 0
> select distinct transmission_status from msdb.sys.transmission_queue
> No Rows Returned
>
> select sq.name,qm.* from sys.dm_broker_queue_monitors qm
> join msdb.sys.service_queues sq on qm.queue_id = sq.object_id
> where database_id = db_id('msdb')
> InternalMailQueue 4 843150049 INACTIVE 2
006-03-10
> 16:29:19.997 2006-03-10 16:29:19.983 0
> ExternalMailQueue 4 875150163 INACTIVE 2
006-03-10
> 16:39:19.957 2006-03-10 16:24:42.243 0
>
> Remus Rusanu [MSFT] wrote:|||CoreyB,
I had similar symptoms but not identical. Database Mail stopped
working unexpectedly including send test email as well as alerts.
Also, database mail log had no activity since a couple of days ago when
it stopped working. I had 37 messages unsent.
I double-checked the following:
1. database mail enabled via surface configuration
2. proper agent and profiles setup
3. service broker message delivery activated
4. database mail in mail host database started
All looked good so far...
5. messages stuck in queue -- yes, 37 total 6. status of messages in
queue -- status "unsent" which traces back to problem with database
mail configuration or external program not getting called for some
reason.
So I basically navigated to location of databasemail90.exe and
double-clicked to run manually and viola, messages started flowing.
However, CMD window stayed open longer than expected so I closed
abruptly.
After this, Step 4 above, "database mail started" now showed status of
"stopped". I ran a command in SQL studio to restart and now things
worked as expected -- mail flowing without me having to double-click
anything.
In summary, my observation is that the external program,
databasemail90.exe was in a "bad state" and required me to kick start
it manually.
http://msdn2.microsoft.com/en-US/library/ms189959(SQL.90).aspx
Here is relevant SQL obtained from MSDN troubleshooting guides if
anyone is interested:
--check to see if service broker is enabled SELECT is_broker_enabled
FROM sys.databases WHERE name = 'msdb' ;
--check to see if database mail is started in msdb database use msdb go
EXECUTE dbo.sysmail_help_status_sp ;
--start database mail if necessary
EXECUTE dbo.sysmail_start_sp ;
--check status of mail queue
sysmail_help_queue_sp @.queue_type = 'Mail' ;
--check database mail event log
select * from sysmail_event_log
--check database mail queue for status of all items select * from
sysmail_allitems
select * from sysmail_allitems

Database Mail SQL 2005

I'm having a problem with database mail in SQL Server 2005. I have set up a default profile. My SMTP server is not a localhost instead i've fed SMTP ip address and port no. The same setting in Outlook express works fine for Incoming and outgoing mails. but in SQL 2005 i'm not able to send test emails. The following errors show up in the sql server agent log

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2006-06-13T10:47:27). Exception Message: Could not connect to mail server. (An established connection was aborted by the software in your host machine).
)

Please help me out....

I have the same problem,

Help please!!!!!!

|||What about testing the sending of Emails using telnet ?

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||yea, got the same problem. We need help with this issue and not a direction to telnet. Thanks|||Yes, sure but telnet will help you to see which error the SMTP server is throwing back during the sending of the message. I don′t want to instruct you using telnet, but thats often the best way to debug the communication.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||i've got the same problem on 64-bit version.
but outlook has sent the e-mails from this computer.

i cannot find in internet some clarifying answer about this problem
|||GUYS!!!!!!

It WORK!!!

See:

Database Mail in SQL Server 2005
www.databasejournal.com/features/mssql/article.php/3626056
|||

hii

sending mail is worked. now i need to send the mail to multirecipients from a table. how could we do that? thank you very much

|||

Hi,

I would use something like this:

use adventureworks

Declare @.Recipients varchar(4000)

select @.Recipients = coalesce(@.Recipients + ';' , '' ) + emailAddress

FROM Person.Contact

PRINT @.Recipients

The results:

a0@.adventure-works.com;a1@.adventure-works.com;aaron0@.adventure-works.com;aaron1@.adventure-works.com;aaron10@.adventure-works.com

|||you're perfect Wink|||Drat - that didn't fix it for me, I still get:

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 5 (2007-06-12T10:46:15). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
)

Outlook express can send fine. I am trying to use a gmail account configured using these settings:

Database Mail SQL 2005

I'm having a problem with database mail in SQL Server 2005. I have set up a default profile. My SMTP server is not a localhost instead i've fed SMTP ip address and port no. The same setting in Outlook express works fine for Incoming and outgoing mails. but in SQL 2005 i'm not able to send test emails. The following errors show up in the sql server agent log

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2006-06-13T10:47:27). Exception Message: Could not connect to mail server. (An established connection was aborted by the software in your host machine).
)

Please help me out....

I have the same problem,

Help please!!!!!!

|||What about testing the sending of Emails using telnet ?

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||yea, got the same problem. We need help with this issue and not a direction to telnet. Thanks|||Yes, sure but telnet will help you to see which error the SMTP server is throwing back during the sending of the message. I don′t want to instruct you using telnet, but thats often the best way to debug the communication.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||i've got the same problem on 64-bit version.
but outlook has sent the e-mails from this computer.

i cannot find in internet some clarifying answer about this problem
|||GUYS!!!!!!

It WORK!!!

See:

Database Mail in SQL Server 2005
www.databasejournal.com/features/mssql/article.php/3626056
|||

hii

sending mail is worked. now i need to send the mail to multirecipients from a table. how could we do that? thank you very much

|||

Hi,

I would use something like this:

use adventureworks

Declare @.Recipients varchar(4000)

select @.Recipients = coalesce(@.Recipients + ';' , '' ) + emailAddress

FROM Person.Contact

PRINT @.Recipients

The results:

a0@.adventure-works.com;a1@.adventure-works.com;aaron0@.adventure-works.com;aaron1@.adventure-works.com;aaron10@.adventure-works.com

|||you're perfect Wink|||Drat - that didn't fix it for me, I still get:

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 5 (2007-06-12T10:46:15). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
)

Outlook express can send fine. I am trying to use a gmail account configured using these settings: