SP_PROCESSMAIL

  • I am having a problem getting the SP_PROCESSMAIL procedure to work on my SQL 7.0 box.

    I have a mapi client setup and a valid mailbox for the services account.  XP_STARTMAIL works correctly.

    However, when I execute:  exec sp_processmail I get an error stating:

    Server: Msg 18007, Level 16, State 1, Line 0

    Supplied datatype for @set_user is not allowed, expecting 'varchar'

    If I enter in a user to execute as, I still get the same answer. For example:

    execute sp_processmail @set_user = 'rhunt'

    or

    execute sp_processmail @set_user = rhunt

    both get the same error...the exact same error as above.  I checked the stored procedure and it is looking for sysname???  Does anyone have any experience with this stored procedure on SQL 7.0?

    Thanks in advance.

    Ryan

  • I am wondering what if you left off that @set_user option?  does your stuff work?

     

    in sql 7.0 master here is how it is defined:

    create procedure sp_processmail --- 1996/06/19 17:30

     @subject varchar(255)=NULL,

     @filetype varchar(3)='txt',

     @separator varchar(3)='tab',

     @set_user sysname='guest',

     @dbuse sysname='master'

     

     

    mom

  • From BOL

    Is the security context in which the query should be run. user is sysname. If user is not specified, the security context defaults to that of the user executing xp_sendmail.

     

    Maybe you shoud check the security context of xp_sendmail. Under wich account, runs SQL. With wath rights?

Viewing 3 posts - 1 through 2 (of 2 total)

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