sending email from SQL Server 2008 Express


  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
Who is Participating?

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

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:

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

For info about blat:

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.


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:

And a total solution:

Gotta try this myself when i get some spare time.
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!
Marten RuneSQL Expert/Infrastructure ArchitectCommented:
Great feedback
This sounds lika a better solution than my proposed.

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.
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.