sp_send_dbmail .csv attachment not opening in I-Phone

  • I have a process which sends mail with attachment (.csv file) through SP sp_send_dbmail. This SP sends mail successfully to user. User can open .csv file in windows outlook mail server. But same file can not open in I-Pad, iphone etc. Quick Look shows error.

    Your early response is highly appreciated.

    Below is the code which I am using to send mail.

    ---================

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'AutoMail',

    @recipients = 'ravinder.singh@abc.com;',

    @copy_recipients = '' ,

    @blind_copy_recipients = '',

    @subject = 'Test mail',

    @body = 'The attach file contains a lis of agencies',

    @body_format = 'HTML', @execute_query_database = 'AU_08102012', @query = 'SET NOCOUNT ON;Select AgencyID,AgencyName From [AU_08102012].[Dbo].Tbl_Agency Where AgencyID < 20', @attach_query_result_as_file = 1 ,

    @query_attachment_filename = 'NewMyTestFile.csv', @query_result_header = 1,

    @query_result_width = 32767,

    @exclude_query_output = 1,

    @query_result_no_padding = 1,

    @query_result_separator = ','

    --================

    R S Bisht

  • What is the size of the file?

    Can you open the file in notepad in Windows?

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices

  • you should post it in iphone forum.

    no problem with your sql serevr

    -----------------------------------------------------------------------------
    संकेत कोकणे

  • file size is 5 kb.

  • This is a problem with iPhone / iPad, if SQL is sending the mail and it can be viewd via outlook OK, then the problem is not with SQL or the mail its with the device.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply