i want to run the following script from within a c# application :
EXEC msdb.dbo.sp_send_dbmail
profile_name = 'Adventure Works Administrator',
recipients = 'emailaddress',
body = 'The stored procedure finished successfully.',
subject = 'Automated Success Message' ;
//plse see : [login to view URL]
//i want to use "msdb.dbo.sp_send_dbmail" to send my Database mails using SQL Database Mail
//i know how to send mail from within SQL Server Management Studio using my SMTP settings
//but i want a script to be created so that i can run the stored procedure from within a c# application to send the mail.
//see example below.
List<string> recipients = new List<string>();
[login to view URL]("mail1 at example dot com");
[login to view URL]("mail2 at example dot com");
string FromAddress = "support at example dot com";
string ReplytoAddress = "support1 aexample dot com";
string ProfileName = "SQL DB SendMail";
//i use dataadapter to run the stored procedure in example below
var cls = new Data.DataTables.SQLMAIL_TableAdapters.SQLMAIL_TableAdapter();
cls.sp_SQL_DATABASE_MAIL_SEND(ProfileName , recipients, FromAddress, "Subject", "Body");
Hi,
Myself dinesh expert in asp.net, c# and sql server with 10 yrs of experience in software development.
Developed various web applications for finance, insurance , education and research domain.
to send mail u can use either smtp or stored procedure. u have to call a stored procedure in which other stored procedure gets called.
let me know your view.
Awaiting for your positive response.
Thanks and regards...dinesh.
Hello sir/madam
we have read and understand your requirement and very much confident that we can complete this project within low budget and less time . Give us chance to serve you better
looking forward to be hired by you soon.
Regards,
softtechsurat
Not sure what problem you are facing, I can help you complete the email calling from either Stored Procedure, or in C# code. I have experience on both scenarios. Please let me know.