risk-x
asked on
How to auto send mai by using this function sp_send_dbmaill
I have the following:
can anyone explain what are these functions for (@profile_name ,@query @attach_query_result_as_fi le = 0,@query_result_header ,
@query_result_width ,
@exclude_query_output and
@query_result_separator)? and I couldnt find this script when execute (msdb.dbo.sp_send_dbmai)l?
can anyone explain what are these functions for (@profile_name ,@query @attach_query_result_as_fi
@query_result_width ,
@exclude_query_output and
@query_result_separator)? and I couldnt find this script when execute (msdb.dbo.sp_send_dbmai)l?
I have the following:
EXEC msdb.dbo.sp_send_dbmail
@recipients=N'email@address',
@body='None',
@subject ='Subject',
@body_format = 'HTML',
@profile_name = 'Profile',
@query ='set nocount on; exec dataDayStrip 657,4,7; set nocount off;',
@attach_query_result_as_file = 0,
@query_result_header = 1,
@query_result_width = 1000,
@exclude_query_output = 1,
@query_result_separator = ';'
explained at http://msdn.microsoft.com/en-us/library/ms190307.aspx
ASKER
After I try to execute the following code. There is a error message. what is this error message about?
Thx
Msg 14636, Level 16, State 1, Procedure sp_send_dbmail, Line 95
No global profile is configured. Specify a profile name in the @profile_name parameter.
Thx
Msg 14636, Level 16, State 1, Procedure sp_send_dbmail, Line 95
No global profile is configured. Specify a profile name in the @profile_name parameter.
EXEC msdb.dbo.sp_send_dbmail @recipients='tcyee@risk-x.com.my',
@subject = 'fail download',
@body = 'testing',
@body_format = 'HTML' ;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thx for the explanation! you are really helpful......Thx