xp_sendmail failed with mail error 0x80004005

  • Hi ,

    I have a job in SQL Server 2000, which has 5 steps in it, all the job is to send the reports to my mailid along with few members. Among the 5 steps, all the 4 steps gets executed and i will receive the mail, but the for the first step, i will not receive the mail it is getting failed and the reason given is "xp_sendmail failed with mail error 0x80004005", some times the first step also gets executed and i will recv the mail, so will any one please help me regarding this.

    Thanks in advance

    Dakshina Murthy

  • - 8004005 is most of the time an authority issue.

    - are you sending attachements ?

    - post the jobstep / full job create script, maybe we can help out.

    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

  • Yes i am sending an attaching which sends the results of a query which may have a size of 3 MB or even more.

    Here is the script which i am sending for your perusal, please help me

    EXEC xp_sendmail @recipients = daks@gmail.com',

    @copy_recipients = 'girish@gmail.com',

    @query = 'select * from reports_new',

    @attachments ='report.xls',

    @subject = 'Report from the new job',

    @message = 'Automatically From The Jobs which is new',

    @attach_results = 'TRUE',

    @separator ='',

    @width=1000

  • - is this step run with another user than the rest of the job?

    -since you're on sql2005 (forum) did you try it with dbmail ?

    (avoid the overhead of mail-client)

    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

  • No , it runs in the same user and for the same db for which the other job (Steps) run. I am using SQL server 2000 SQL Mail not SQL server 2005 DBMail

  • looks to me like you might be missing a single quote in the address

  • Hello,

    This error can also occur if the INBOX is full for the account running SQL Mail!

    Regards,

    Hanslindgren

  • If the email you are trying to send has an attachment, make sure the file you are attaching exists. I have gotten

    Msg 18025, Level 16, State 1, Line 0

    xp_sendmail: failed with mail error 0x80004005

    when the file to be sent doesn't exist so check that the file is there and there isn't an error in your file path.

Viewing 8 posts - 1 through 7 (of 7 total)

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