xp_sendmail fails

  • Hey we had the same problem

    and the reason is that when you are using SQL7 with service pack 2 and if you are using xp_sendmail through DTS package

    it actually fills up your outlook sent item folder . But when you check you outlook sent item folder you cant see the

    mails . So you have to use the MDB viewer to clean the mails.

    as per microsoft

    SQL Mail for SQL Server 6.5 and SQL Server 7.0 saves a copy of sent messages in the Sent Items folder of Outlook, which is the default behavior with the simple MAPI interface. Even if you disable this option by clearing the Save copies of messages in Sent Items folder option in the Outlook mail client, the option is ignored.

    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q261133

    Fix is apply service pack 3 or above or else periodically clean the mails using MDB viewer.

    Let me know if this fix's your problem

    --Ramesh

    Sydney

    Edited by - ramesh on 10/29/2002 5:39:23 PM


    Ramesh

  • Had same issues running SQL 7.0 SP3 on Windows 2000 (SP2). SQL Server SP4 seemed to resolve the issue.

    quote:


    Hi everyone, my script that contains xp_sendmail stopped working over the weekend with the following error:

    xp_sendmail: failed with mail error 0x80040115 [SQLSTATE 42000] (Error 18025). The step failed.

    I went to EM and right clickec on xp_sendmail and clicked on the Test button and the test was successful. Any idea what might be wrong?


  • We used to have huge issues with SQL Mail. Turns out that sometimes Outlook was raising a message something to the effect of "The data store was changed...". Only found this message when I actually ran Outlook. Instead of using SQL Mail, we now use CDO to send mail.

    Check out http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;Q312839

    Russell Sinclair

    Author "From Access to SQL Server"


    Russell Sinclair
    Author "From Access to SQL Server"

  • You'll have to apply the hotfix provided by MS (SQL Server 2000 Hotfix 8.00.603 for Sqlmap70.dll) Only Sqlmap70.dll needs to be replaced.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • KEYWORD: SONOMASolutions

    we have the same problem here, [FYI: We are ALWAYS up on the latest patches and fixes, of which the above, did NOT solve...SO: ] with a dozen or so servers, where we are using outlook express, MSSQL 2000&2005. and VM ware. The problem we think has to do with one of the servers locking up the process and not letting mail run properly. We tried a number of tests: 1. one server, sending mail, while another tried, then a third etc. then releasing one of the servers, that started the process and it released the services to the others etc.

    Out solution is to use a server, in this case our 'test'/play admin server, and remote connect to ALL MSSQL servers in our domain: 2000/2005--bear with me, it won't matter.

    we run the following script:

    which will fetch into a cursor each server, from the registered sysservers table

    remote connect,

    stop, start each servers mail

    and you are done: here is the types of msgs, you'll get for a valid stop/start on 2000 ONLY:

    "

    Server: [server_name]

    Server: Msg 17966, Level 16, State 4, Line 17

    xp_stopmail: SQL Mail session is not started.

    "

    You MAY, if MSSQL 2005 is involved, get the following becuase 2005 does not use SQL MAIL,

    therefore, a bunch of blah blah blah stuff, you don't need to worry about:

    "

    Server: [server_name]

    Server: Msg 15281, Level 16, State 1, Line 17

    SQL Server blocked access to procedure 'sys.xp_stopmail'

    of component 'SQL Mail XPs' because this component is turned

    off as part of the security configuration for this server.

    A system administrator can enable the use of 'SQL Mail XPs'

    by using sp_configure. For more information about enabling

    'SQL Mail XPs', see "Surface Area Configuration"

    in SQL Server Books Online.

    "

    -------- start script -------------

    DECLARE @srv_name varchar(200)

    DECLARE @command varchar(200)

    DECLARE stopmail_cursor CURSOR FOR

    select srvname from dbo.sysservers order by srvname

    OPEN stopmail_cursor

    FETCH NEXT FROM stopmail_cursor

    INTO @srv_name

    WHILE @@FETCH_STATUS = 0

    BEGIN

    select @command = '['+@srv_name+'].master.dbo.xp_stopmail'

    print 'Server: '+@srv_name

    exec @command

    FETCH NEXT FROM stopmail_cursor

    INTO @srv_name

    END

    CLOSE stopmail_cursor

    DEALLOCATE stopmail_cursor

    GO

    ------------ end script -------

Viewing 5 posts - 16 through 19 (of 19 total)

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