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