exec msdb.dbo.sp_send_dbmail
@recipients= 'rockniu@gmail.com',
@copy_recipients = 'rock.niu@axisoft.com.hk',
@profile_name = 'PBCRM_Mail_Account',
@subject = 'Database mail test',
@body = '<h1>Database mail test</h1>',
@body_format = 'HTML' ;
@recipients= 'rockniu@gmail.com',
@copy_recipients = 'rock.niu@axisoft.com.hk',
@profile_name = 'PBCRM_Mail_Account',
@subject = 'Database mail test',
@body = '<h1>Database mail test</h1>',
@body_format = 'HTML' ;
注意事项:
要确保相应的Profile已经建立,database mail功能要打开。