sending email from SQL Server 2008 Express

Hi,

  I need to send emails from a StoredProcedure in SQL Server 2008 Express. On a SQL2000, I use xpsmtp80.dll, can I use it on a 2008 Express also?

thanks for your help
Dominic34Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Marten RuneSQL Expert/Infrastructure ArchitectCommented:
It's not an option included in sql 2008 express:
http://msdn.microsoft.com/en-us/library/ms165636.aspx

You can use blat, and let a cmd from sql send the mail.

For info about blat:
http://www.blat.net/?faq/index.html

It will take some coding. I could do it, but don't have the time. But if you code it into some StoredProc, you can easily implement it on many express installations.

//Marten
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Marten RuneSQL Expert/Infrastructure ArchitectCommented:
And a post on Blat on the community:
http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_23639376.html

And a total solution:
http://bytes.com/topic/sql-server/answers/78709-xp_cmdshell-blat

//Marten
Gotta try this myself when i get some spare time.
0
Dominic34Author Commented:
after some searching on the knowledge database, I found a workaround that uses the procedure sp_send_dbmail. I had to manually configure a profile with the following SP's:

EXECUTE msdb.dbo.sysmail_add_account_sp
EXECUTE msdb.dbo.sysmail_add_profile_sp
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp

and it works fine in 2008 Express !! Mails are queued and sent successfully!
0
Marten RuneSQL Expert/Infrastructure ArchitectCommented:
Great feedback
This sounds lika a better solution than my proposed.

//Marten
0
Dominic34Author Commented:
yeah that's works fine. I gave you the points anyway because at least you took the time to search and answer me. :-)

anyway, parameters for those SP can be found on msdn. it's really easy and it worked first shot.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.