DECLARE @object int

DECLARE @hr int

EXEC   @hr=sp_OACreate 'CDONTS.NewMail',@object OUT

EXEC   @hr=sp_OASetProperty @object,'From','Your Friend'

EXEC   @hr=sp_OASetProperty @object,'Body','This is a test'

EXEC   @hr=sp_OASetProperty @object,'Subject','Test of CDONTS' 

EXEC   @hr=sp_OASetProperty @object,'To','somebody@somewhere.com'

EXEC   @hr=sp_OAMethod @object,'send',NULL

EXEC   @hr=sp_OADestroy @object

GO

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2021-09-18
  • 2021-11-19
  • 2022-12-23
  • 2021-12-28
  • 2021-11-30
猜你喜欢
  • 2021-09-12
  • 2021-06-30
  • 2021-06-30
  • 2021-06-15
  • 2021-10-01
  • 2022-02-12
相关资源
相似解决方案