Wednesday, March 28, 2012
Resetting Email Queue
I have a the database mail system parameters set to retry sending failed
emails every ten minutes. I want to leave these settings as is.
How can I reset the queue ? that is delete all items in the queue - even if
they have failed! I need to refresh/delete them because we send out the
emails manually if they failed tooo many times - and then eventually sql 2005
alse sends them - i have to prevent this.
Answered my quesiton myself!
One can look at the default system stored procedure and modify it to accept
a subject for example as a parameter.
Then just tweak the rest of the stored procedure to make it select only mail
items with similar subjects and delete those!
done!
"I.W Coetzer" wrote:
> Hi
> I have a the database mail system parameters set to retry sending failed
> emails every ten minutes. I want to leave these settings as is.
> How can I reset the queue ? that is delete all items in the queue - even if
> they have failed! I need to refresh/delete them because we send out the
> emails manually if they failed tooo many times - and then eventually sql 2005
> alse sends them - i have to prevent this.
sql
Resetting Email Queue
I have a the database mail system parameters set to retry sending failed
emails every ten minutes. I want to leave these settings as is.
How can I reset the queue ? that is delete all items in the queue - even if
they have failed! I need to refresh/delete them because we send out the
emails manually if they failed tooo many times - and then eventually sql 200
5
alse sends them - i have to prevent this.Answered my quesiton myself!
One can look at the default system stored procedure and modify it to accept
a subject for example as a parameter.
Then just tweak the rest of the stored procedure to make it select only mail
items with similar subjects and delete those!
done!
"I.W Coetzer" wrote:
> Hi
> I have a the database mail system parameters set to retry sending failed
> emails every ten minutes. I want to leave these settings as is.
> How can I reset the queue ? that is delete all items in the queue - even i
f
> they have failed! I need to refresh/delete them because we send out the
> emails manually if they failed tooo many times - and then eventually sql 2
005
> alse sends them - i have to prevent this.
Resetting Email Queue
I have a the database mail system parameters set to retry sending failed
emails every ten minutes. I want to leave these settings as is.
How can I reset the queue ? that is delete all items in the queue - even if
they have failed! I need to refresh/delete them because we send out the
emails manually if they failed tooo many times - and then eventually sql 2005
alse sends them - i have to prevent this.Answered my quesiton myself!
One can look at the default system stored procedure and modify it to accept
a subject for example as a parameter.
Then just tweak the rest of the stored procedure to make it select only mail
items with similar subjects and delete those!
done!
"I.W Coetzer" wrote:
> Hi
> I have a the database mail system parameters set to retry sending failed
> emails every ten minutes. I want to leave these settings as is.
> How can I reset the queue ? that is delete all items in the queue - even if
> they have failed! I need to refresh/delete them because we send out the
> emails manually if they failed tooo many times - and then eventually sql 2005
> alse sends them - i have to prevent this.
Monday, March 12, 2012
Request for the permission of type System.Net.Mail.SmtpPermission
I have some problems with sending Mail over System.Net.Mail ...
I have made a C# Class which sends mail, and it works fine.
Now I have added this assembly to SQL Server 2005,
I made the SQL function and so on.
When I try to run it I get the following message:
Msg 50000, Level 16, State 1, Procedure SendMail, Line 114
Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Would be very very happy for any comments !!
Thanks and best regards
Frank UrayI just found out what to do ... :-)
Add "External access assembly" to the Login or role .|||
Hi,
how did you register the assembly in SQL Server (which security settings / safe/unsafe/external Access ?
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Request for the permission of type System.Net.Mail.SmtpPermission
I have some problems with sending Mail over System.Net.Mail ...
I have made a C# Class which sends mail, and it works fine.
Now I have added this assembly to SQL Server 2005,
I made the SQL function and so on.
When I try to run it I get the following message:
Msg 50000, Level 16, State 1, Procedure SendMail, Line 114
Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Would be very very happy for any comments !!
Thanks and best regards
Frank UrayI just found out what to do ... :-)
Add "External access assembly" to the Login or role .|||
Hi,
how did you register the assembly in SQL Server (which security settings / safe/unsafe/external Access ?
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de