Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    18

    Unanswered: SQL Mail with attachment not working

    Hi,

    I am able to send normal mails from SQL Server with no attachments.

    But when i am trying to send mail with an attachment i get following error.

    Server: Msg 18025, Level 16, State 1, Line 0
    xp_sendmail: failed with mail error 0x80004005

    I am running SQL Server 2000 , SP3.

    select @@version
    ---------------------------------
    Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)



    exec master..xp_msver
    ------------------------------------------
    Index Name Internal_Value Character_Value
    ------ -------------------------------- -------------- ------------------------------------------------------------------------------------------------------------------------
    1 ProductName NULL Microsoft SQL Server
    2 ProductVersion 524288 8.00.760
    3 Language 1033 English (United States)
    4 Platform NULL NT INTEL X86
    5 Comments NULL NT INTEL X86
    6 CompanyName NULL Microsoft Corporation
    7 FileDescription NULL SQL Server Windows NT
    8 FileVersion NULL 2000.080.0760.00
    9 InternalName NULL SQLSERVR
    10 LegalCopyright NULL © 1988-2003 Microsoft Corp. All rights reserved.
    11 LegalTrademarks NULL Microsoft® is a registered trademark of Microsoft Corporation. Windows(TM) is a trademark of Microsoft Corporation
    12 OriginalFilename NULL SQLSERVR.EXE
    13 PrivateBuild NULL NULL
    14 SpecialBuild 49807360 NULL
    15 WindowsVersion 143851525 5.0 (2195)
    16 ProcessorCount 1 1
    17 ProcessorActiveMask 1 00000001
    18 ProcessorType 586 PROCESSOR_INTEL_PENTIUM
    19 PhysicalMemory 254 254 (266850304)
    20 Product ID NULL NULL

    (20 row(s) affected)



    Any help would be helpful.

    Regards
    Jay

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    TRY THIS
    Code:
    EXEC xp_sendmail @recipients = 'YOURMAILID', 
       @query = 'SELECT * FROM INFORMATION_SCHEMA.TABLES',
       @subject = 'SQL Server Report',
       @message = 'The contents of INFORMATION_SCHEMA.TABLES:',
       @attach_results = 'TRUE', @width = 250
    and tell us what you get ...
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Mar 2004
    Posts
    18
    Originally posted by Enigma
    TRY THIS
    Code:
    EXEC xp_sendmail @recipients = 'YOURMAILID', 
       @query = 'SELECT * FROM INFORMATION_SCHEMA.TABLES',
       @subject = 'SQL Server Report',
       @message = 'The contents of INFORMATION_SCHEMA.TABLES:',
       @attach_results = 'TRUE', @width = 250
    and tell us what you get ...
    Yes i do get an attachment by running that query, but what if there is some file which is there on the machine, i want to send some report file as a mail with an attachment i m getting that error.

    Though MS says that it has corrected the error by SP1, and i am runiing SP3...

    Any insight on that ????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •