VitaminD
asked on
Database Mail Error
I am able to send the email from database mail without the attachment.
When I add the attachment I receive this error.
Error: Msg 22051, Level 16, State 1, Line 0
Attachment file \\JMID\Testing2\MyNewTest. txt is invalid.
I checked to make sure the service account has permissions to the folder and that I have permissions to the folder and file.
and the text file. I tried mapping the drive. I used the local path and the shared folder
path. Not sure why this will not work. We are using outlook here. Any suggestions would be appreciated.
Thanks In Advance
EXEC msdb.dbo.sp_send_dbmail
@recipients= N'myemailaddress@example.c om',
@profile_name =N'MyProfileName',
@subject =N'Testing mail ',
@body= 'Please see attachment for details',
@file_attachments= N'\\JMID\Testing2\MyNewTes t.txt'
Error: Msg 22051, Level 16, State 1, Line 0
Attachment file \\JMID\Testing2\MyNewTest. txt is invalid.
When I add the attachment I receive this error.
Error: Msg 22051, Level 16, State 1, Line 0
Attachment file \\JMID\Testing2\MyNewTest.
I checked to make sure the service account has permissions to the folder and that I have permissions to the folder and file.
and the text file. I tried mapping the drive. I used the local path and the shared folder
path. Not sure why this will not work. We are using outlook here. Any suggestions would be appreciated.
Thanks In Advance
EXEC msdb.dbo.sp_send_dbmail
@recipients= N'myemailaddress@example.c
@profile_name =N'MyProfileName',
@subject =N'Testing mail ',
@body= 'Please see attachment for details',
@file_attachments= N'\\JMID\Testing2\MyNewTes
Error: Msg 22051, Level 16, State 1, Line 0
Attachment file \\JMID\Testing2\MyNewTest.
As suggested before, it really seems to be a permission issue on SQL Server service user.
You can just check with a local file (local I mean on the SQL server machine).
Regards.
You can just check with a local file (local I mean on the SQL server machine).
Regards.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What account is SQL running under? Does this account have rights to this share & file?
Regards
David