Hi All,
I have setup the database mail for users to send emails without problems. Now the need is to also have it send attachments. I have setup a user account with the specified rights to the network folder where the attachments are located.
I am able to send the attachments w/o problems since I'm part of the sysadmin. Users are not able to send attachments by just adding them to the DatabaseMailUserRole on the msdb database. They get the following error when trying to send the attachment:
"Failed to open attachment N'\\mynetwork\folder\test.doc'. Access Denied. Severity 16."
All users have access to the network folder as well. When I tested it by adding one of the users to the sysadmin, she was able to execute the procedure w/o problems.
Can anyone tell me what privileges I would need to give users for them to be able to send email attachments via sql? I have tried just about everything.
Here is the sp I trigger for sending the emails:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MyProfile',
@recipients = 'john.d@myemail.com',
@subject = 'SQL Mail',
@body = 'Test',
@IMPORTANCE = 'HIGH',
@file_attachments = N'\\mynetwork\folder\test.doc';
Any help would be greatly appreciated!
JP
I have setup the database mail for users to send emails without problems. Now the need is to also have it send attachments. I have setup a user account with the specified rights to the network folder where the attachments are located.
I am able to send the attachments w/o problems since I'm part of the sysadmin. Users are not able to send attachments by just adding them to the DatabaseMailUserRole on the msdb database. They get the following error when trying to send the attachment:
"Failed to open attachment N'\\mynetwork\folder\test.doc'. Access Denied. Severity 16."
All users have access to the network folder as well. When I tested it by adding one of the users to the sysadmin, she was able to execute the procedure w/o problems.
Can anyone tell me what privileges I would need to give users for them to be able to send email attachments via sql? I have tried just about everything.
Here is the sp I trigger for sending the emails:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MyProfile',
@recipients = 'john.d@myemail.com',
@subject = 'SQL Mail',
@body = 'Test',
@IMPORTANCE = 'HIGH',
@file_attachments = N'\\mynetwork\folder\test.doc';
Any help would be greatly appreciated!
JP