- Louis Arena
- PowerBuilder
- Thursday, 20 December 2018 08:35 PM UTC
Why am I able to send a simple email through sp_spend_dbmail on the SQL server but when I try to send the same code through Powerbuilder it does not work. For example, the following code works fine in ISQL
exec msdb.dbo.sp_send_dbmail
@profile_name = 'SQL_Mail',
@recipients= 'anyone@outlook.com',
@subject= 'Test Message',
@body='Body of email'
go
When I execute the following code in RMS, it does not work. I get a return code of 100 which makes no sense and there really is no explanation of this error.
DECLARE send_dbmail PROCEDURE FOR msdb.dbo.sp_send_dbmail
@profile_name = 'SQL_Mail',
@recipients = 'anyone@outlook.com',
@subject = 'Test Message',
@body = 'Body of email'
using SQLCA
;
EXECUTE send_dbmail ;
Any help would be appreciated.
Louis
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.