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

Monday, March 26, 2012

Problem with SQL Mail and Oulook 2003

Here try this. Outlook 2003 and SQL 2000 SP3.
Open Outlook 2003. Then go to SQL Server Manager and browse to where the
settings are for SQL Mail. Make sure the MAPI profile you choose there is
the MAPI profile you used to sign into Outlook 2003. Then Test the SQL Mail
by clicking Test. You should get a MAPI session was initialized. Then
close out of SQL Server Manager. Bring up Outlook 2003 and close it. Now
try to start Outlook 2003. You will get an error that the Outlook folders
could not be initialized and Outlook 2003 will shut down. The only way to
fix this is to stop the MSSQL services. Then you will be able to open
Outlook 2003.
George Hester
_________________________________> The only way to
quote:

> fix this is to stop the MSSQL services. Then you will be able to open
> Outlook 2003.

Or to use a different profile.
Or to not use a SQL Server machine for reading client e-mail (is it a
server, or a desktop? you need to pick one...).
Or to use a different solution for e-mail within SQL Server (e.g. avoid MAPI
altogether).
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Or to fix the SQL Mail so that it releases the MAPI session when it =
finishes? Doesn't that sound like a reasonable expectation?
--=20
George Hester
__________________________________
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message =
news:ebcRGeM2DHA.2208@.TK2MSFTNGP12.phx.gbl...
quote:

open[QUOTE]
>=20
> Or to use a different profile.
>=20
> Or to not use a SQL Server machine for reading client e-mail (is it a
> server, or a desktop? you need to pick one...).
>=20
> Or to use a different solution for e-mail within SQL Server (e.g. =

avoid MAPI
quote:

> altogether).
>=20
> --=20
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>=20
>
|||>> Or to fix the SQL Mail so that it releases the MAPI session when it
finishes? Doesn't that sound like a reasonable expectation?
A little more work involved there, than the changes I proposed to your
strategy (seeing as this clearly doesn't affect a large number of
customers).
Frankly, I'd rather they focus their attention on Yukon than tending to
onesy-twosy "bugs" where people aren't using the software as intended
anyway...
A|||Oh well I suppose I am the only person in the world who thinks it would be a
good idea for SQL Mail to release the MAPI session when it finishes. Too
bad huh?
George Hester
_________________________________
"Aaron Bertrand - MVP" <aaron@.TRASHaspfaq.com> wrote in message
news:esQrocV2DHA.2308@.TK2MSFTNGP11.phx.gbl...
quote:

> finishes? Doesn't that sound like a reasonable expectation?
> A little more work involved there, than the changes I proposed to your
> strategy (seeing as this clearly doesn't affect a large number of
> customers).
> Frankly, I'd rather they focus their attention on Yukon than tending to
> onesy-twosy "bugs" where people aren't using the software as intended
> anyway...
> A
>

Problem with SQL Mail and Oulook 2003

Here try this. Outlook 2003 and SQL 2000 SP3.
Open Outlook 2003. Then go to SQL Server Manager and browse to where the
settings are for SQL Mail. Make sure the MAPI profile you choose there is
the MAPI profile you used to sign into Outlook 2003. Then Test the SQL Mail
by clicking Test. You should get a MAPI session was initialized. Then
close out of SQL Server Manager. Bring up Outlook 2003 and close it. Now
try to start Outlook 2003. You will get an error that the Outlook folders
could not be initialized and Outlook 2003 will shut down. The only way to
fix this is to stop the MSSQL services. Then you will be able to open
Outlook 2003.
--
George Hester
_________________________________> The only way to
> fix this is to stop the MSSQL services. Then you will be able to open
> Outlook 2003.
Or to use a different profile.
Or to not use a SQL Server machine for reading client e-mail (is it a
server, or a desktop? you need to pick one...).
Or to use a different solution for e-mail within SQL Server (e.g. avoid MAPI
altogether).
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||Or to fix the SQL Mail so that it releases the MAPI session when it =finishes? Doesn't that sound like a reasonable expectation?
-- George Hester
__________________________________
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message =news:ebcRGeM2DHA.2208@.TK2MSFTNGP12.phx.gbl...
> > The only way to
> > fix this is to stop the MSSQL services. Then you will be able to =open
> > Outlook 2003.
> > Or to use a different profile.
> > Or to not use a SQL Server machine for reading client e-mail (is it a
> server, or a desktop? you need to pick one...).
> > Or to use a different solution for e-mail within SQL Server (e.g. =avoid MAPI
> altogether).
> > -- > Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
> >|||>> Or to fix the SQL Mail so that it releases the MAPI session when it
finishes? Doesn't that sound like a reasonable expectation?
A little more work involved there, than the changes I proposed to your
strategy (seeing as this clearly doesn't affect a large number of
customers).
Frankly, I'd rather they focus their attention on Yukon than tending to
onesy-twosy "bugs" where people aren't using the software as intended
anyway...
A|||Oh well I suppose I am the only person in the world who thinks it would be a
good idea for SQL Mail to release the MAPI session when it finishes. Too
bad huh?
--
George Hester
_________________________________
"Aaron Bertrand - MVP" <aaron@.TRASHaspfaq.com> wrote in message
news:esQrocV2DHA.2308@.TK2MSFTNGP11.phx.gbl...
> >> Or to fix the SQL Mail so that it releases the MAPI session when it
> finishes? Doesn't that sound like a reasonable expectation?
> A little more work involved there, than the changes I proposed to your
> strategy (seeing as this clearly doesn't affect a large number of
> customers).
> Frankly, I'd rather they focus their attention on Yukon than tending to
> onesy-twosy "bugs" where people aren't using the software as intended
> anyway...
> A
>sql

problem with sql mail

i have configured sql mail to send emails to outlook with exchange server
running with outlook ... but the problem iam facing is that although the
option of "sent messages to the sent items folder " is cliecked under the
sql agent mail and also in the outlook but still any mail that goes through
sql mail is delivered successfully to the recipient but does not go the sent
items folder of outlook
would appreciate any help on this thnaksIf you are running SQL Server 2000, SQL Mail for SQL Server
2000 does not save a copy of sent messages in the Sent Items
folder. If you need a copy of the messages, you need to cc:
them to an exchange account and create an Outlook message
rule that routes these message copies to the Sent Items
folder.
For more info, refer to:
INF: Common SQL Mail Problems
http://support.microsoft.com/?scid=315886
The section: Q7: Why do I not have any sent messages in the
Sent Items folder explains this issue.
-Sue
On Sun, 7 Mar 2004 15:09:13 +1100, "afsheen"
<afsheenj@.hotmial.com> wrote:

>i have configured sql mail to send emails to outlook with exchange server
>running with outlook ... but the problem iam facing is that although the
>option of "sent messages to the sent items folder " is cliecked under the
>sql agent mail and also in the outlook but still any mail that goes through
>sql mail is delivered successfully to the recipient but does not go the sen
t
>items folder of outlook
>would appreciate any help on this thnaks
>

Problem with SQL Agent using Database Mail

All,
I posted this message to a thread dated 11/25/2004... I guess I should have
started a new thread.
Anyway, I am having a problem with database mail and the SQL agent. The
error from the maintenance history notification step is:
Executing the query "EXECUTE msdb.dbo.sp_notify_operator
@.name=N'JimmyV',@.body=N'Database Verification Failed!'
" failed with the following error: "No global profile is configured. Specify
a profile name in the @.profile_name parameter.". Possible failure reasons:
Problems with the query, "ResultSet" property not set correctly, parameters
not set correctly, or connection not established correctly.
I've configured the database mail system, created a database mail account
and profile which is the default for the agent. I created the agent user
account in msdb in the DatabaseMailUser role. And I've created the operator.
I've also tried public default profiles and they fail too.
I can send test messages from Database Mail.
The interseting thing is that the 'Test' button is dimmed on the SQL Agent,
Alert System, Mail Session page even though the correct profile is selected!
Please, any help will be greatly appreciated.
Thanks,
Jim
I had a somewhat similar problem. In my case, I assigned the operators
and the Notification recipients prior to configuring the SQL Agent to
use Database Mail. Even though the jobs were set to notify on
completion (success/failure), I never received any e-mails. However,
restarting the SQL Agent service fixed it.
-Prabhakar
JimmyV wrote:
> All,
> I posted this message to a thread dated 11/25/2004... I guess I should have
> started a new thread.
> Anyway, I am having a problem with database mail and the SQL agent. The
> error from the maintenance history notification step is:
> Executing the query "EXECUTE msdb.dbo.sp_notify_operator
> @.name=N'JimmyV',@.body=N'Database Verification Failed!'
> " failed with the following error: "No global profile is configured. Specify
> a profile name in the @.profile_name parameter.". Possible failure reasons:
> Problems with the query, "ResultSet" property not set correctly, parameters
> not set correctly, or connection not established correctly.
> I've configured the database mail system, created a database mail account
> and profile which is the default for the agent. I created the agent user
> account in msdb in the DatabaseMailUser role. And I've created the operator.
> I've also tried public default profiles and they fail too.
> I can send test messages from Database Mail.
> The interseting thing is that the 'Test' button is dimmed on the SQL Agent,
> Alert System, Mail Session page even though the correct profile is selected!
> Please, any help will be greatly appreciated.
> Thanks,
> Jim
|||Do you have Outlook installed on your server? I believe that it is required
to create the profiles that can be assigned in the server properties and in
the SQL Agent properties. After you install Outlook, go to the control
panel and create a profile on the server using the account the SQL Server
service uses. You then should be able to assign the profile to both the
server mail properties and the SQL Agent properties.
If you have Outlook installed, use Query analyzer and try sending an email
message using xp_sendmail. If you get an error message, issue the following
commands...
exec xp_stopmail
exec xp_startmail
This should get you started in trying to get SQL mail to work for you on
your server.
"preddy" <prvangala@.gmail.com> wrote in message
news:1138730276.706755.82690@.f14g2000cwb.googlegro ups.com...
>I had a somewhat similar problem. In my case, I assigned the operators
> and the Notification recipients prior to configuring the SQL Agent to
> use Database Mail. Even though the jobs were set to notify on
> completion (success/failure), I never received any e-mails. However,
> restarting the SQL Agent service fixed it.
> -Prabhakar
> JimmyV wrote:
>
|||> Do you have Outlook installed on your server?
Database Mail (in contrast to SQL Mail) does *not* need Outlook as it isn't using MAPI. Database
mail makes SMTP calls, so it is only dependent on TCP being available. Database Mail is new to SQL
Server 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Scott Cupstid" <scupstid@.tampabay.rr.com> wrote in message news:drob90$2chn$1@.news3.infoave.net...
> Do you have Outlook installed on your server? I believe that it is required to create the
> profiles that can be assigned in the server properties and in the SQL Agent properties. After you
> install Outlook, go to the control panel and create a profile on the server using the account the
> SQL Server service uses. You then should be able to assign the profile to both the server mail
> properties and the SQL Agent properties.
> If you have Outlook installed, use Query analyzer and try sending an email message using
> xp_sendmail. If you get an error message, issue the following commands...
> exec xp_stopmail
> exec xp_startmail
> This should get you started in trying to get SQL mail to work for you on your server.
> "preddy" <prvangala@.gmail.com> wrote in message
> news:1138730276.706755.82690@.f14g2000cwb.googlegro ups.com...
>
|||I tried what you suggested and unfortunately it still fails in the same way.
The really strange thing is that the 'Test' button will not activate; telling
me something is still wrong.
Jim
"preddy" wrote:

> I had a somewhat similar problem. In my case, I assigned the operators
> and the Notification recipients prior to configuring the SQL Agent to
> use Database Mail. Even though the jobs were set to notify on
> completion (success/failure), I never received any e-mails. However,
> restarting the SQL Agent service fixed it.
> -Prabhakar
> JimmyV wrote:
>

Problem with SQL Agent using Database Mail

All,
I posted this message to a thread dated 11/25/2004... I guess I should have
started a new thread.
Anyway, I am having a problem with database mail and the SQL agent. The
error from the maintenance history notification step is:
Executing the query "EXECUTE msdb.dbo.sp_notify_operator
@.name=N'JimmyV',@.body=N'Database Verification Failed!'
" failed with the following error: "No global profile is configured. Specify
a profile name in the @.profile_name parameter.". Possible failure reasons:
Problems with the query, "ResultSet" property not set correctly, parameters
not set correctly, or connection not established correctly.
I've configured the database mail system, created a database mail account
and profile which is the default for the agent. I created the agent user
account in msdb in the DatabaseMailUser role. And I've created the operator.
I've also tried public default profiles and they fail too.
I can send test messages from Database Mail.
The interseting thing is that the 'Test' button is dimmed on the SQL Agent,
Alert System, Mail Session page even though the correct profile is selected!
Please, any help will be greatly appreciated.
Thanks,
JimI had a somewhat similar problem. In my case, I assigned the operators
and the Notification recipients prior to configuring the SQL Agent to
use Database Mail. Even though the jobs were set to notify on
completion (success/failure), I never received any e-mails. However,
restarting the SQL Agent service fixed it.
-Prabhakar
JimmyV wrote:
> All,
> I posted this message to a thread dated 11/25/2004... I guess I should have
> started a new thread.
> Anyway, I am having a problem with database mail and the SQL agent. The
> error from the maintenance history notification step is:
> Executing the query "EXECUTE msdb.dbo.sp_notify_operator
> @.name=N'JimmyV',@.body=N'Database Verification Failed!'
> " failed with the following error: "No global profile is configured. Specify
> a profile name in the @.profile_name parameter.". Possible failure reasons:
> Problems with the query, "ResultSet" property not set correctly, parameters
> not set correctly, or connection not established correctly.
> I've configured the database mail system, created a database mail account
> and profile which is the default for the agent. I created the agent user
> account in msdb in the DatabaseMailUser role. And I've created the operator.
> I've also tried public default profiles and they fail too.
> I can send test messages from Database Mail.
> The interseting thing is that the 'Test' button is dimmed on the SQL Agent,
> Alert System, Mail Session page even though the correct profile is selected!
> Please, any help will be greatly appreciated.
> Thanks,
> Jim|||Do you have Outlook installed on your server? I believe that it is required
to create the profiles that can be assigned in the server properties and in
the SQL Agent properties. After you install Outlook, go to the control
panel and create a profile on the server using the account the SQL Server
service uses. You then should be able to assign the profile to both the
server mail properties and the SQL Agent properties.
If you have Outlook installed, use Query analyzer and try sending an email
message using xp_sendmail. If you get an error message, issue the following
commands...
exec xp_stopmail
exec xp_startmail
This should get you started in trying to get SQL mail to work for you on
your server.
"preddy" <prvangala@.gmail.com> wrote in message
news:1138730276.706755.82690@.f14g2000cwb.googlegroups.com...
>I had a somewhat similar problem. In my case, I assigned the operators
> and the Notification recipients prior to configuring the SQL Agent to
> use Database Mail. Even though the jobs were set to notify on
> completion (success/failure), I never received any e-mails. However,
> restarting the SQL Agent service fixed it.
> -Prabhakar
> JimmyV wrote:
>> All,
>> I posted this message to a thread dated 11/25/2004... I guess I should
>> have
>> started a new thread.
>> Anyway, I am having a problem with database mail and the SQL agent. The
>> error from the maintenance history notification step is:
>> Executing the query "EXECUTE msdb.dbo.sp_notify_operator
>> @.name=N'JimmyV',@.body=N'Database Verification Failed!'
>> " failed with the following error: "No global profile is configured.
>> Specify
>> a profile name in the @.profile_name parameter.". Possible failure
>> reasons:
>> Problems with the query, "ResultSet" property not set correctly,
>> parameters
>> not set correctly, or connection not established correctly.
>> I've configured the database mail system, created a database mail account
>> and profile which is the default for the agent. I created the agent user
>> account in msdb in the DatabaseMailUser role. And I've created the
>> operator.
>> I've also tried public default profiles and they fail too.
>> I can send test messages from Database Mail.
>> The interseting thing is that the 'Test' button is dimmed on the SQL
>> Agent,
>> Alert System, Mail Session page even though the correct profile is
>> selected!
>> Please, any help will be greatly appreciated.
>> Thanks,
>> Jim
>|||> Do you have Outlook installed on your server?
Database Mail (in contrast to SQL Mail) does *not* need Outlook as it isn't using MAPI. Database
mail makes SMTP calls, so it is only dependent on TCP being available. Database Mail is new to SQL
Server 2005.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Scott Cupstid" <scupstid@.tampabay.rr.com> wrote in message news:drob90$2chn$1@.news3.infoave.net...
> Do you have Outlook installed on your server? I believe that it is required to create the
> profiles that can be assigned in the server properties and in the SQL Agent properties. After you
> install Outlook, go to the control panel and create a profile on the server using the account the
> SQL Server service uses. You then should be able to assign the profile to both the server mail
> properties and the SQL Agent properties.
> If you have Outlook installed, use Query analyzer and try sending an email message using
> xp_sendmail. If you get an error message, issue the following commands...
> exec xp_stopmail
> exec xp_startmail
> This should get you started in trying to get SQL mail to work for you on your server.
> "preddy" <prvangala@.gmail.com> wrote in message
> news:1138730276.706755.82690@.f14g2000cwb.googlegroups.com...
>>I had a somewhat similar problem. In my case, I assigned the operators
>> and the Notification recipients prior to configuring the SQL Agent to
>> use Database Mail. Even though the jobs were set to notify on
>> completion (success/failure), I never received any e-mails. However,
>> restarting the SQL Agent service fixed it.
>> -Prabhakar
>> JimmyV wrote:
>> All,
>> I posted this message to a thread dated 11/25/2004... I guess I should have
>> started a new thread.
>> Anyway, I am having a problem with database mail and the SQL agent. The
>> error from the maintenance history notification step is:
>> Executing the query "EXECUTE msdb.dbo.sp_notify_operator
>> @.name=N'JimmyV',@.body=N'Database Verification Failed!'
>> " failed with the following error: "No global profile is configured. Specify
>> a profile name in the @.profile_name parameter.". Possible failure reasons:
>> Problems with the query, "ResultSet" property not set correctly, parameters
>> not set correctly, or connection not established correctly.
>> I've configured the database mail system, created a database mail account
>> and profile which is the default for the agent. I created the agent user
>> account in msdb in the DatabaseMailUser role. And I've created the operator.
>> I've also tried public default profiles and they fail too.
>> I can send test messages from Database Mail.
>> The interseting thing is that the 'Test' button is dimmed on the SQL Agent,
>> Alert System, Mail Session page even though the correct profile is selected!
>> Please, any help will be greatly appreciated.
>> Thanks,
>> Jim
>|||I tried what you suggested and unfortunately it still fails in the same way.
The really strange thing is that the 'Test' button will not activate; telling
me something is still wrong.
Jim
"preddy" wrote:
> I had a somewhat similar problem. In my case, I assigned the operators
> and the Notification recipients prior to configuring the SQL Agent to
> use Database Mail. Even though the jobs were set to notify on
> completion (success/failure), I never received any e-mails. However,
> restarting the SQL Agent service fixed it.
> -Prabhakar
> JimmyV wrote:
> > All,
> >
> > I posted this message to a thread dated 11/25/2004... I guess I should have
> > started a new thread.
> >
> > Anyway, I am having a problem with database mail and the SQL agent. The
> > error from the maintenance history notification step is:
> >
> > Executing the query "EXECUTE msdb.dbo.sp_notify_operator
> > @.name=N'JimmyV',@.body=N'Database Verification Failed!'
> > " failed with the following error: "No global profile is configured. Specify
> > a profile name in the @.profile_name parameter.". Possible failure reasons:
> > Problems with the query, "ResultSet" property not set correctly, parameters
> > not set correctly, or connection not established correctly.
> >
> > I've configured the database mail system, created a database mail account
> > and profile which is the default for the agent. I created the agent user
> > account in msdb in the DatabaseMailUser role. And I've created the operator.
> >
> > I've also tried public default profiles and they fail too.
> >
> > I can send test messages from Database Mail.
> >
> > The interseting thing is that the 'Test' button is dimmed on the SQL Agent,
> > Alert System, Mail Session page even though the correct profile is selected!
> >
> > Please, any help will be greatly appreciated.
> >
> > Thanks,
> > Jim
>sql

Problem with SQL Agent using Database Mail

All,
I posted this message to a thread dated 11/25/2004... I guess I should have
started a new thread.
Anyway, I am having a problem with database mail and the SQL agent. The
error from the maintenance history notification step is:
Executing the query "EXECUTE msdb.dbo.sp_notify_operator
@.name=N'JimmyV',@.body=N'Database Verification Failed!'
" failed with the following error: "No global profile is configured. Specify
a profile name in the @.profile_name parameter.". Possible failure reasons:
Problems with the query, "ResultSet" property not set correctly, parameters
not set correctly, or connection not established correctly.
I've configured the database mail system, created a database mail account
and profile which is the default for the agent. I created the agent user
account in msdb in the DatabaseMailUser role. And I've created the operator.
I've also tried public default profiles and they fail too.
I can send test messages from Database Mail.
The interseting thing is that the 'Test' button is dimmed on the SQL Agent,
Alert System, Mail Session page even though the correct profile is selected!
Please, any help will be greatly appreciated.
Thanks,
JimI had a somewhat similar problem. In my case, I assigned the operators
and the Notification recipients prior to configuring the SQL Agent to
use Database Mail. Even though the jobs were set to notify on
completion (success/failure), I never received any e-mails. However,
restarting the SQL Agent service fixed it.
-Prabhakar
JimmyV wrote:
> All,
> I posted this message to a thread dated 11/25/2004... I guess I should hav
e
> started a new thread.
> Anyway, I am having a problem with database mail and the SQL agent. The
> error from the maintenance history notification step is:
> Executing the query "EXECUTE msdb.dbo.sp_notify_operator
> @.name=N'JimmyV',@.body=N'Database Verification Failed!'
> " failed with the following error: "No global profile is configured. Speci
fy
> a profile name in the @.profile_name parameter.". Possible failure reasons:
> Problems with the query, "ResultSet" property not set correctly, parameter
s
> not set correctly, or connection not established correctly.
> I've configured the database mail system, created a database mail account
> and profile which is the default for the agent. I created the agent user
> account in msdb in the DatabaseMailUser role. And I've created the operato
r.
> I've also tried public default profiles and they fail too.
> I can send test messages from Database Mail.
> The interseting thing is that the 'Test' button is dimmed on the SQL Agent
,
> Alert System, Mail Session page even though the correct profile is selecte
d!
> Please, any help will be greatly appreciated.
> Thanks,
> Jim|||Do you have Outlook installed on your server? I believe that it is required
to create the profiles that can be assigned in the server properties and in
the SQL Agent properties. After you install Outlook, go to the control
panel and create a profile on the server using the account the SQL Server
service uses. You then should be able to assign the profile to both the
server mail properties and the SQL Agent properties.
If you have Outlook installed, use Query analyzer and try sending an email
message using xp_sendmail. If you get an error message, issue the following
commands...
exec xp_stopmail
exec xp_startmail
This should get you started in trying to get SQL mail to work for you on
your server.
"preddy" <prvangala@.gmail.com> wrote in message
news:1138730276.706755.82690@.f14g2000cwb.googlegroups.com...
>I had a somewhat similar problem. In my case, I assigned the operators
> and the Notification recipients prior to configuring the SQL Agent to
> use Database Mail. Even though the jobs were set to notify on
> completion (success/failure), I never received any e-mails. However,
> restarting the SQL Agent service fixed it.
> -Prabhakar
> JimmyV wrote:
>|||> Do you have Outlook installed on your server?
Database Mail (in contrast to SQL Mail) does *not* need Outlook as it isn't
using MAPI. Database
mail makes SMTP calls, so it is only dependent on TCP being available. Datab
ase Mail is new to SQL
Server 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Scott Cupstid" <scupstid@.tampabay.rr.com> wrote in message news:drob90$2chn$1@.news3.infoave
.net...
> Do you have Outlook installed on your server? I believe that it is requir
ed to create the
> profiles that can be assigned in the server properties and in the SQL Agen
t properties. After you
> install Outlook, go to the control panel and create a profile on the serve
r using the account the
> SQL Server service uses. You then should be able to assign the profile to
both the server mail
> properties and the SQL Agent properties.
> If you have Outlook installed, use Query analyzer and try sending an email
message using
> xp_sendmail. If you get an error message, issue the following commands...
> exec xp_stopmail
> exec xp_startmail
> This should get you started in trying to get SQL mail to work for you on y
our server.
> "preddy" <prvangala@.gmail.com> wrote in message
> news:1138730276.706755.82690@.f14g2000cwb.googlegroups.com...
>|||I tried what you suggested and unfortunately it still fails in the same way.
The really strange thing is that the 'Test' button will not activate; tellin
g
me something is still wrong.
Jim
"preddy" wrote:

> I had a somewhat similar problem. In my case, I assigned the operators
> and the Notification recipients prior to configuring the SQL Agent to
> use Database Mail. Even though the jobs were set to notify on
> completion (success/failure), I never received any e-mails. However,
> restarting the SQL Agent service fixed it.
> -Prabhakar
> JimmyV wrote:
>

Tuesday, March 20, 2012

Problem with sending mail with Database Mail

Hi


I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.

I've defined a public profile.
I've enabled Database Mail stored procedures through the Surface Area Configuration .

but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .


when I execute sp_send_dbmail in the Managment Studio the message is
"Mail queued" but the mail is not sent.

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

here is the log file after executing sp_send_dbmail:


1) "DatabaseMail process is started"

2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."


The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?


please help me.

POUYAN

I am moving this to the SQL Server Database Engine forum.

Problem with sending mail with Database Mail


I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.

I've defined a public profile.
I've enabled Database Mail stored procedures through the Surface Area Configuration .

but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .


when I execute sp_send_dbmail in the Managment Studio the message is
"Mail queued" but the mail is not sent.

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

here is the log file after executing sp_send_dbmail:


1) "DatabaseMail process is started"

2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."


The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?


please help me.

POUYAN

Hi

This article in the forums seems to refer to your problem:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=718220&SiteID=1

It think it implies that the machine you are connecting to as an SMTP server is not actually running an SMTP service. You need to check that the machine you have set as the mail server is correct and that SMTP is running on it (on the standard port). There might also be a firewall issue between you and that machine.

I think if it was an authorisation issue with the SMTP server you would get a different error.

|||

Any way thank u.

I'll give it a try

|||

Hi

By default service broker is enabled in each database except 'master' & 'tempdb'

any way again I enabled service broker.

where as DatabaseMail90.exe is triggerd whene I execute sp_send_dbmail,the mail should be given to the queue.but when I execute

sysmail_help_queue_sp to see the queue the 'length' column is 0 which says there is no mail in the queue.I'm confused.

More over I think another problem is that DatabaseMail90.exe can not communicate with the machine(server) .

do u know how I can check communication settings (ports,... ) between SQL SERVER and the server to see what's going on?

thanks.

POUYAN.

|||Database Mail uses SMTP, unlike the old SQL Mail that used Exchange by piggybacking off Outlook/MAPI. In other words, if you're trying to point it to your organization's Exchange server, it won't work unless Exchange is accepting SMTP connections. (I know only slightly less than jack squat about Exchange, so I have no idea how to enable it, or if it's enabled by default.)

If you want to test connectivity, use telnet from the command prompt:

telnet server-address 25

If you see some prompts from the server, or a blank screen with the cursor flashing, then the connection is probably fine. (Hit Ctrl+] and then type quit to exit telnet.) If you receive a message stating that the connection failed, then the issue is most likely that the machine you're pointing at isn't running SMTP. If you can get through with telnet, but DB Mail is still puking, then make sure whatever mail server you're pointing at isn't disallowing your database server to relay mail through it.|||

After doing some efforts now every thing looks to be ok.

in the log :

"Message was sent succesfully "

this shows that the mail was transfered from database mail to SMTP server.

but still the mail is not sent to the email address.

any idea?

|||

After doing some efforts now every thing looks to be ok.

in the log :

"Message was sent succesfully "

this shows that the mail was transfered from database mail to SMTP server.

but still the mail is not sent to the email address.

any idea?

|||In my experience, it's normally been one of two things.

1. Spam filtering. Pretty self-explanatory.

2. The SMTP server you're directly sending to is misconfigured, or otherwise unable to connect to any other mail servers. If you're running IIS SMTP, you can check C:\Inetpub\mailroot\badmail (or whichever directory you've moved Inetpub or badmail to) and see if there are any messages in there that it's given up on trying to deliver. Also, I believe the messages will sit in \Inetpub\mailroot\queue for some time before being thrown in badmail.|||

U where right the problem was spam filtering

Thnks a lot for ur help.

POUYAN.

Problem with sending mail via Database Mail

Hi every body


I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.

I've defined a public profile.
I've enabled Database Mail stored procedures through the Surface Area Configuration .

but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .


when I execute sp_send_dbmail in the Managment Studio the message is
"Mail queued" but the mail is not sent.

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

here is the log file after executing sp_send_dbmail:


1) "DatabaseMail process is started"

2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."

The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?


please help me.

POUYAN

Hi POUYAN,

you must have enabled the Service Broker in the msdb database.

BOL: How to: Activate Service Broker Message Delivery in Databases (Transact-SQL)

To see if the message was sent successfully, you can run a query on the sysmail_allitems system view.

SELECT * FROM sysmail_allitems|||

Hi

By default service broker is enabled in each database except 'master' & 'tempdb'

any way again I enabled service broker.

where as DatabaseMail90.exe is triggerd whene I execute sp_send_dbmail,the mail should be given to the queue.but when I execute

sysmail_help_queue_sp to see the queue the 'length' column is 0 which says there is no mail in the queue.I'm confused.

More over I think another problem is that DatabaseMail90.exe can not communicate with the machine(server) .

do u know how I can check communication settings between SQL SERVER and the server to see what's going on?

thanks.

POUYAN.

|||

Hi POUYAN,

plz check:

SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb' ;

A value of 0 indicates that Service Broker message delivery is not activated in the msdb database

EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole': check members of the DatabaseMailUserRole

EXEC msdb.dbo.sysmail_help_principalprofile_sp

EXECUTE dbo.sysmail_help_status_sp ; check status of Database Mail

EXECUTE dbo.sysmail_start_sp: start Database Mail in a mail host database

EXEC msdb.dbo.sysmail_help_queue_sp @.queue_type = 'mail'

|||

Pouyan wrote:

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

You do not need an endpoint for database mail.

Pouyan wrote:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it).

The problem has nothing to do with Service Broker. Your mailer process gets the mail to send and attempt to deliver, but ot cannot. The problems seems to be with yoyr @.mailserver_name or @.port parameters passed to sysmail_add_account_sp.

HTH,
~ Remus

|||

Hi

I 've just installed SMTP services from the "add windows component"

(I hadn't done !!!!)

but this time I'm facing a new error type:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)
"

and when I execute sysmail_help_queue_sp this would be the resuls:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

*database mail is enabled

*service broker is ebabed(is_broker_enabled=1 for msdb in the sys.databases)

you said this may be because off port or server name:

in the account I use to send the mail I have set these vause:

server name:pouyan(computer name in the system properties)

port =25

should they be any thing else?

thanks

pouyan.

|||

Hi

I checked every thing just as u said every thinh was ok

here is the result of executin sysmail_help_queue_sp:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

--

I just today installed SMTP services!!!!

and the type of error changed to this form:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)

"

And there is another thing to tell : starting the database mail external(databasemail90.exe) is not mentioned in sysmail_event_log or Windows Application event log.

but I can see databasemail90.exe running in the prosses tab of the Task Manager.

I'm extremly confused.

|||You need not only install SMTP service, but you also need to configure it properly. See http://support.microsoft.com/kb/304897 for how to test your SMTP relay.|||

Every thing is ok

thanks

|||

Pouyan,

This may also be happeneing because of any antivirus installed on your machine. BCoz Antivirus softwares ususally block the ports. For example, Macfee blocks the port no 25 which is used by SQL server to send mails.

|||

I have to set up database mail to send emails using .

I am also getting the same error. I tested for SMTP relay service also.

am still getting this error :

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-04-09T15:24:10). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.abc.com

can u please let know where I can find the errors.

|||

Hi,

can you pls. explain to me in short how did you solve this problem?

I'm getting the same error message....

Thnx a lot in advance.

BR,

Bozo

|||

This problem was caused for ME because of Anti-Virus.

AV blocks services from sending on TCP-25 (like an email worm). Adjust the AV software accordingly. Add DATABASEMAIL90.EXE to the list of innocent programs in your AV.

Problem with sending mail via Database Mail

Hi every body


I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.

I've defined a public profile.
I've enabled Database Mail stored procedures through the Surface Area Configuration .

but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .


when I execute sp_send_dbmail in the Managment Studio the message is
"Mail queued" but the mail is not sent.

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

here is the log file after executing sp_send_dbmail:


1) "DatabaseMail process is started"

2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."

The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?


please help me.

POUYAN

Hi POUYAN,

you must have enabled the Service Broker in the msdb database.

BOL: How to: Activate Service Broker Message Delivery in Databases (Transact-SQL)

To see if the message was sent successfully, you can run a query on the sysmail_allitems system view.

SELECT * FROM sysmail_allitems|||

Hi

By default service broker is enabled in each database except 'master' & 'tempdb'

any way again I enabled service broker.

where as DatabaseMail90.exe is triggerd whene I execute sp_send_dbmail,the mail should be given to the queue.but when I execute

sysmail_help_queue_sp to see the queue the 'length' column is 0 which says there is no mail in the queue.I'm confused.

More over I think another problem is that DatabaseMail90.exe can not communicate with the machine(server) .

do u know how I can check communication settings between SQL SERVER and the server to see what's going on?

thanks.

POUYAN.

|||

Hi POUYAN,

plz check:

SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb' ;

A value of 0 indicates that Service Broker message delivery is not activated in the msdb database

EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole': check members of the DatabaseMailUserRole

EXEC msdb.dbo.sysmail_help_principalprofile_sp

EXECUTE dbo.sysmail_help_status_sp ; check status of Database Mail

EXECUTE dbo.sysmail_start_sp: start Database Mail in a mail host database

EXEC msdb.dbo.sysmail_help_queue_sp @.queue_type = 'mail'

|||

Pouyan wrote:

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

You do not need an endpoint for database mail.

Pouyan wrote:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it).

The problem has nothing to do with Service Broker. Your mailer process gets the mail to send and attempt to deliver, but ot cannot. The problems seems to be with yoyr @.mailserver_name or @.port parameters passed to sysmail_add_account_sp.

HTH,
~ Remus

|||

Hi

I 've just installed SMTP services from the "add windows component"

(I hadn't done !!!!)

but this time I'm facing a new error type:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)
"

and when I execute sysmail_help_queue_sp this would be the resuls:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

*database mail is enabled

*service broker is ebabed(is_broker_enabled=1 for msdb in the sys.databases)

you said this may be because off port or server name:

in the account I use to send the mail I have set these vause:

server name:pouyan(computer name in the system properties)

port =25

should they be any thing else?

thanks

pouyan.

|||

Hi

I checked every thing just as u said every thinh was ok

here is the result of executin sysmail_help_queue_sp:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

--

I just today installed SMTP services!!!!

and the type of error changed to this form:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)

"

And there is another thing to tell : starting the database mail external(databasemail90.exe) is not mentioned in sysmail_event_log or Windows Application event log.

but I can see databasemail90.exe running in the prosses tab of the Task Manager.

I'm extremly confused.

|||You need not only install SMTP service, but you also need to configure it properly. See http://support.microsoft.com/kb/304897 for how to test your SMTP relay.|||

Every thing is ok

thanks

|||

Pouyan,

This may also be happeneing because of any antivirus installed on your machine. BCoz Antivirus softwares ususally block the ports. For example, Macfee blocks the port no 25 which is used by SQL server to send mails.

|||

I have to set up database mail to send emails using .

I am also getting the same error. I tested for SMTP relay service also.

am still getting this error :

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-04-09T15:24:10). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.abc.com

can u please let know where I can find the errors.

|||

Hi,

can you pls. explain to me in short how did you solve this problem?

I'm getting the same error message....

Thnx a lot in advance.

BR,

Bozo

|||

This problem was caused for ME because of Anti-Virus.

AV blocks services from sending on TCP-25 (like an email worm). Adjust the AV software accordingly. Add DATABASEMAIL90.EXE to the list of innocent programs in your AV.

Problem with sending mail via Database Mail

Hi every body


I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.

I've defined a public profile.
I've enabled Database Mail stored procedures through the Surface Area Configuration .

but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .


when I execute sp_send_dbmail in the Managment Studio the message is
"Mail queued" but the mail is not sent.

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

here is the log file after executing sp_send_dbmail:


1) "DatabaseMail process is started"

2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."

The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?


please help me.

POUYAN

Hi POUYAN,

you must have enabled the Service Broker in the msdb database.

BOL: How to: Activate Service Broker Message Delivery in Databases (Transact-SQL)

To see if the message was sent successfully, you can run a query on the sysmail_allitems system view.

SELECT * FROM sysmail_allitems|||

Hi

By default service broker is enabled in each database except 'master' & 'tempdb'

any way again I enabled service broker.

where as DatabaseMail90.exe is triggerd whene I execute sp_send_dbmail,the mail should be given to the queue.but when I execute

sysmail_help_queue_sp to see the queue the 'length' column is 0 which says there is no mail in the queue.I'm confused.

More over I think another problem is that DatabaseMail90.exe can not communicate with the machine(server) .

do u know how I can check communication settings between SQL SERVER and the server to see what's going on?

thanks.

POUYAN.

|||

Hi POUYAN,

plz check:

SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb' ;

A value of 0 indicates that Service Broker message delivery is not activated in the msdb database

EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole': check members of the DatabaseMailUserRole

EXEC msdb.dbo.sysmail_help_principalprofile_sp

EXECUTE dbo.sysmail_help_status_sp ; check status of Database Mail

EXECUTE dbo.sysmail_start_sp: start Database Mail in a mail host database

EXEC msdb.dbo.sysmail_help_queue_sp @.queue_type = 'mail'

|||

Pouyan wrote:

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

You do not need an endpoint for database mail.

Pouyan wrote:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it).

The problem has nothing to do with Service Broker. Your mailer process gets the mail to send and attempt to deliver, but ot cannot. The problems seems to be with yoyr @.mailserver_name or @.port parameters passed to sysmail_add_account_sp.

HTH,
~ Remus

|||

Hi

I 've just installed SMTP services from the "add windows component"

(I hadn't done !!!!)

but this time I'm facing a new error type:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)
"

and when I execute sysmail_help_queue_sp this would be the resuls:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

*database mail is enabled

*service broker is ebabed(is_broker_enabled=1 for msdb in the sys.databases)

you said this may be because off port or server name:

in the account I use to send the mail I have set these vause:

server name:pouyan(computer name in the system properties)

port =25

should they be any thing else?

thanks

pouyan.

|||

Hi

I checked every thing just as u said every thinh was ok

here is the result of executin sysmail_help_queue_sp:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

--

I just today installed SMTP services!!!!

and the type of error changed to this form:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)

"

And there is another thing to tell : starting the database mail external(databasemail90.exe) is not mentioned in sysmail_event_log or Windows Application event log.

but I can see databasemail90.exe running in the prosses tab of the Task Manager.

I'm extremly confused.

|||You need not only install SMTP service, but you also need to configure it properly. See http://support.microsoft.com/kb/304897 for how to test your SMTP relay.|||

Every thing is ok

thanks

|||

Pouyan,

This may also be happeneing because of any antivirus installed on your machine. BCoz Antivirus softwares ususally block the ports. For example, Macfee blocks the port no 25 which is used by SQL server to send mails.

|||

I have to set up database mail to send emails using .

I am also getting the same error. I tested for SMTP relay service also.

am still getting this error :

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-04-09T15:24:10). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.abc.com

can u please let know where I can find the errors.

|||

Hi,

can you pls. explain to me in short how did you solve this problem?

I'm getting the same error message....

Thnx a lot in advance.

BR,

Bozo

|||

This problem was caused for ME because of Anti-Virus.

AV blocks services from sending on TCP-25 (like an email worm). Adjust the AV software accordingly. Add DATABASEMAIL90.EXE to the list of innocent programs in your AV.

Problem with sending mail via Database Mail

Hi every body


I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.

I've defined a public profile.
I've enabled Database Mail stored procedures through the Surface Area Configuration .

but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .


when I execute sp_send_dbmail in the Managment Studio the message is
"Mail queued" but the mail is not sent.

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

here is the log file after executing sp_send_dbmail:


1) "DatabaseMail process is started"

2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."

The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?


please help me.

POUYAN

Hi POUYAN,

you must have enabled the Service Broker in the msdb database.

BOL: How to: Activate Service Broker Message Delivery in Databases (Transact-SQL)

To see if the message was sent successfully, you can run a query on the sysmail_allitems system view.

SELECT * FROM sysmail_allitems|||

Hi

By default service broker is enabled in each database except 'master' & 'tempdb'

any way again I enabled service broker.

where as DatabaseMail90.exe is triggerd whene I execute sp_send_dbmail,the mail should be given to the queue.but when I execute

sysmail_help_queue_sp to see the queue the 'length' column is 0 which says there is no mail in the queue.I'm confused.

More over I think another problem is that DatabaseMail90.exe can not communicate with the machine(server) .

do u know how I can check communication settings between SQL SERVER and the server to see what's going on?

thanks.

POUYAN.

|||

Hi POUYAN,

plz check:

SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb' ;

A value of 0 indicates that Service Broker message delivery is not activated in the msdb database

EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole': check members of the DatabaseMailUserRole

EXEC msdb.dbo.sysmail_help_principalprofile_sp

EXECUTE dbo.sysmail_help_status_sp ; check status of Database Mail

EXECUTE dbo.sysmail_start_sp: start Database Mail in a mail host database

EXEC msdb.dbo.sysmail_help_queue_sp @.queue_type = 'mail'

|||

Pouyan wrote:

Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?

You do not need an endpoint for database mail.

Pouyan wrote:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it).

The problem has nothing to do with Service Broker. Your mailer process gets the mail to send and attempt to deliver, but ot cannot. The problems seems to be with yoyr @.mailserver_name or @.port parameters passed to sysmail_add_account_sp.

HTH,
~ Remus

|||

Hi

I 've just installed SMTP services from the "add windows component"

(I hadn't done !!!!)

but this time I'm facing a new error type:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)
"

and when I execute sysmail_help_queue_sp this would be the resuls:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

*database mail is enabled

*service broker is ebabed(is_broker_enabled=1 for msdb in the sys.databases)

you said this may be because off port or server name:

in the account I use to send the mail I have set these vause:

server name:pouyan(computer name in the system properties)

port =25

should they be any thing else?

thanks

pouyan.

|||

Hi

I checked every thing just as u said every thinh was ok

here is the result of executin sysmail_help_queue_sp:

queue_type length state last_empty_rowset_time last_activated_time
- -- -
mail 0 RECEIVES_OCCURRING 2007-03-14 12:44:29.713 2007-03-14 12:38:48.463
status 0 INACTIVE 2007-03-14 12:44:29.763 2007-03-14 12:44:29.713

--

I just today installed SMTP services!!!!

and the type of error changed to this form:

"

Message
The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2007-03-14T03:55:26).
Exception Message: Cannot send mails to mail server
. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for pooyan_pdm@.yahoo.com).
)

"

And there is another thing to tell : starting the database mail external(databasemail90.exe) is not mentioned in sysmail_event_log or Windows Application event log.

but I can see databasemail90.exe running in the prosses tab of the Task Manager.

I'm extremly confused.

|||You need not only install SMTP service, but you also need to configure it properly. See http://support.microsoft.com/kb/304897 for how to test your SMTP relay.|||

Every thing is ok

thanks

|||

Pouyan,

This may also be happeneing because of any antivirus installed on your machine. BCoz Antivirus softwares ususally block the ports. For example, Macfee blocks the port no 25 which is used by SQL server to send mails.

|||

I have to set up database mail to send emails using .

I am also getting the same error. I tested for SMTP relay service also.

am still getting this error :

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-04-09T15:24:10). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.abc.com

can u please let know where I can find the errors.

|||

Hi,

can you pls. explain to me in short how did you solve this problem?

I'm getting the same error message....

Thnx a lot in advance.

BR,

Bozo

|||

This problem was caused for ME because of Anti-Virus.

AV blocks services from sending on TCP-25 (like an email worm). Adjust the AV software accordingly. Add DATABASEMAIL90.EXE to the list of innocent programs in your AV.