XP_SENDMAIL Weird behaviour - help!

  • I've just come across this weird bug - any suggestions

    Setting up notification on various job steps for a clients database I'm using XP_SENDMAIL.

    in the @message parameter i used the following

    @message='Backup Sucessfull for database CE90'

    the message returns as blank (a single empty white space)

    after a bit of digging (other jobs were working ok) i found that the wording CE90 was causing the problem it appears that CE followed by any number does something weird to the message.

    I resolved the situation by changing it to

    @message='Backup Sucessfull for database CE 90' and now the mail has the correct text.

    I was thinking that this might be some sort of control code or escape character, but i can't find anything.

    Help

     

     

    MVDBA

  • That is interesting. Did you delete and recreate the message (in that line) to eliminate any suspiscious characters?

  • yes, the exact syntax of the command is below

    xp_sendmail @recipients='SQLSERVER@QUANTIX-UK.COM',@message='Backup sucessfull for database CE 90',@subject='Database backup'

    i tried this in query analyser and retyped the whole line by hand to make sure it wasn't a hidden char.

    if i delete the space in CE 90 then the job comes back as an empty email.

    there must be something in the XP_SENDMAIL that treats CE9 (or also i tried CE0) as a control code or escape code or something.

    you can test it by putting the following into QA

    xp_sendmail @recipients='SQLSERVER@QUANTIX-UK.COM',@message='Backup sucessfull for database CE 90',@subject='Database backup'

    GO

    xp_sendmail @recipients='SQLSERVER@QUANTIX-UK.COM',@message='Backup sucessfull for database CE90',@subject='Database backup'

    MVDBA

  • hmm,

    i'v been playing with this and i've managed to send emails on my own installation of SQL server 2000.

    I'm starting to think that there might be something in my customer's outgoing mail filter.

     

    MVDBA

  • I had no problems with it, mailing out or internal.

    DB


    The systems fine with no users loggged in. Can we keep it that way ?br>

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

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