netdevelooper Posted November 19, 2012 Report Posted November 19, 2012 oka table lo unna record annnitiki email pampali ante ...sql server lo yela cheyali?
littlemoon Posted November 19, 2012 Report Posted November 19, 2012 email account configure cheyali first..
dotnetrockz Posted November 19, 2012 Report Posted November 19, 2012 [CODE] Exec @rtn_cd=msdb..sp_send_dbmail @recipients = @email_distribution_list ,@subject = @email_subject ,@body = @email_body ,@file_attachments = @attachfilepath If @rtn_cd <> 0 Begin Print 'sending email failed' RAISERROR ('sending email failed',16,1) with seterror Return -1 End [/CODE]
littlemoon Posted November 19, 2012 Report Posted November 19, 2012 go through this http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/
dotnetrockz Posted November 19, 2012 Report Posted November 19, 2012 [quote name='netdevelooper' timestamp='1353342423' post='1302823015'] [color=#ff0000]oka table lo unna record annnitiki email pampali ante [/color]...sql server lo yela cheyali? [/quote] ardham kale...are u performing some sql select and want to email that select list?
karna11 Posted November 19, 2012 Report Posted November 19, 2012 [quote name='Nissan' timestamp='1353342893' post='1302823078'] [CODE] Exec @rtn_cd=msdb..sp_send_dbmail @recipients = @email_distribution_list ,@subject = @email_subject ,@body = @email_body ,@file_attachments = @attachfilepath If @rtn_cd <> 0 Begin Print 'sending email failed' RAISERROR ('sending email failed',16,1) with seterror Return -1 End [/CODE] [/quote] lawyer saab enti idhi , question neeku emini ardham ayyindhi
dotnetrockz Posted November 19, 2012 Report Posted November 19, 2012 [quote name='karna11' timestamp='1353343052' post='1302823103'] lawyer saab enti idhi , question neeku emini ardham ayyindhi [/quote] nenu anukovadam athanu some daily job okati(normal ga email pampadam daanike ekkuva chestharu)...whihc select's or process records and send them as a result to bussiness user..lantidhi chesthadu anukuntunna..so if he wants to send an emaild irectly from sql server he can use that system proc....he can provide that result set as a parameter....
Darling999 Posted November 19, 2012 Report Posted November 19, 2012 First oka Mail account create cheyyi, tarvaatha kinda unna SQl lo nee query modify cheyyi, specify all the fields or a specific. and Run Declare @MailDesc varchar(8000) Declare @MailTo_1 varchar(1000) Declare @MailCC_1 varchar(400) Declare @body1 varchar(1000) Declare @file_attachments nvarchar(1000) Set @MailTo_1 = '[email protected]' set @body1 = (Select [col] From dbo.tbl_name Where col_id = 1) Begin exec msdb.dbo.sp_send_dbmail @profile_name = 'MAIL', @recipients = @MailTo_1, --@copy_recipients = @MailCC_1, @body = @body1, @subject = 'Record', @body_format = 'HTML' end This will send the required result Set to the Mail group recipients
netdevelooper Posted November 19, 2012 Author Report Posted November 19, 2012 rek yenti ante..naku oka error table undi ..a table lo records ante a list lo unna valla andariki nenu mail pampali oka notificatin mail laga like rejected ani and around 600 mails pampali ala..600 email ids different
karna11 Posted November 19, 2012 Report Posted November 19, 2012 [quote name='Nissan' timestamp='1353343365' post='1302823148'] nenu anukovadam athanu some daily job okati(normal ga email pampadam daanike ekkuva chestharu)...whihc select's or process records and send them as a result to bussiness user..lantidhi chesthadu anukuntunna..so if he wants to send an emaild irectly from sql server he can use that system proc....he can provide that result set as a parameter.... [/quote] Nee understood and answer okee but tanu ? adhu kadhu anukuntaa,
netdevelooper Posted November 19, 2012 Author Report Posted November 19, 2012 600 diffrerent emails kada anni times a query run cheyala and yekkda email specify cheyali
Darling999 Posted November 19, 2012 Report Posted November 19, 2012 [quote name='netdevelooper' timestamp='1353343708' post='1302823192'] rek yenti ante..naku oka error table undi ..a table lo records ante a list lo unna valla andariki nenu mail pampali oka notificatin mail laga like rejected ani and around 600 mails pampali ala..600 email ids different [/quote] text file lo pampinchachaa aah details ala ayitey result set ni .txt format ki set cehsi daani Email lo attach chesi pampinchachu
karna11 Posted November 19, 2012 Report Posted November 19, 2012 [quote name='netdevelooper' timestamp='1353343708' post='1302823192'] rek yenti ante..naku oka error table undi ..a table lo records ante a list lo unna valla andariki nenu mail pampali oka notificatin mail laga like rejected ani and around 600 mails pampali ala..600 email ids different [/quote] sender A/c create cheyyala or existing A/c neeee
dotnetrockz Posted November 19, 2012 Report Posted November 19, 2012 [quote name='netdevelooper' timestamp='1353343708' post='1302823192'] rek yenti ante..naku oka error table undi ..a table lo records ante a list lo unna valla andariki nenu mail pampali oka notificatin mail laga like rejected ani and around 600 mails pampali ala..600 email ids different [/quote] 600 ante ecah individual ki different records velthaya..andharki okate na? okate records aithe ask ur admin to create a distribution list and add all this 600 users to that list and in the email distribution list parameter give this as a parameter....
Recommended Posts