1

I would like to send an excel file as mail attachment with the following code. But I get an error. I would appreciate your help.

EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'AutoMail',
@recipients = 'gokhanerdogdu@safikatiyakit.com.tr',
@subject = 'TÜM DEPOLAR TAHMİNİ SAHA STOK DAĞILIMI RAPORU', 
@body = '<p>Merhabalar,</p>
<p>&nbsp;</p>
<p>Ektedir bilginize.</p>
<p><span style="text-decoration: underline; color: #ff0000;"><em>Not: Bu mail sunucudan otomatik gönderilmiştir. Bazı bilgisayarlarda yenileme yapmayabilir.</em></span></p>' , 
@body_format = 'HTML',
@file_attachments = 'D:\LOGO\TIGER3\AMBARLAR\TÜM DEPOLAR TAHMİNİ SAHA STOKLAR.xlsm'

Msg 14630, Level 16, State 1, Procedure sp_GetAttachmentData, Line 59 [Batch Start Line 7]
Database Mail is not permitted to send files with the file extension D:\LOGO\TIGER3\AMBARLAR\TÜM DEPOLAR TAHMİNİ SAHA STOKLAR.xlsm.

enter image description here

0 Answers0