Jump to content

Sql Server Email


Recommended Posts

Posted

oka table lo unna record annnitiki email pampali ante ...sql server lo yela cheyali?

Posted

[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]

Posted

go through this http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/

Posted

[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?

Posted

[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

Posted

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

Posted

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

Posted

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

Posted

[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,

Posted

600 diffrerent emails kada anni times a query run cheyala and yekkda email specify cheyali

Posted

[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

Posted

[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

Posted

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

×
×
  • Create New...