• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 735
  • Last Modified:

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
0
Dominic34
Asked:
Dominic34
  • 3
  • 2
1 Solution
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now