Send Mail Task Error

  • I am having trouble getting a Send Mail task to work -- trouble shooting is aggravated by the extremely meaningless error message [see below]

    The SMTP connection appears not to be working yet it is the same SMTP server that is successfully working on the same server for Database Mail, the same domain user account is used for the mail profile and the user that is executing the SSIS package that has the Send Mail task.

    Does anyone know how to capture a more meaningful error message?

    SSIS package "SendLabel.dtsx" starting.

    Error: 0xC002F304 at Send Label Mail Task, Send Mail Task: An error occurred with the following error message: "Failure sending mail.".

    Task failed: Send Label Mail Task

    SSIS package "SendLabel.dtsx" finished: Success.

    The program '[6896] SendLabel.dtsx: DTS' has exited with code 0 (0x0).

  • have you tried to test it using SSMS? it could be relay settings or a number of different things

    ask your email admins to look in the smtp logs as well

  • Database mail works fine from SSMS and from SQL Agent jobs both on the same server.

    Our SMTP logs are huge but will look there also. I was hoping to find a way to get a better message returned.

    Thank you for your reply.

    For now I am going to give up trying to use the Send Mail task in SSIS and just set up a SQL Agent job that uses 'exec msdb.dbo.sp_send_dbmail ....'

  • I can think of two really common reasons you could get that..

    1. The email address you are trying to send is invalid, many systems will not accept an email for a local domain if it doesn't know the recipient, this is particularly true for Exchange.

    2. The email addresses are separated by an invalid separator, like it wants "," and you are sending ";", and for the life of me I can never remember the standard.

    CEWII

  • Good thoughts. I did think of those, so I have tested it using my own email address [from the same domain] and I have tried comma and semi-colon. The reason it is so hard to remember is because depending on the method it could be either one. For example the sp_send_dbmail uses ";" and the script task uses a comma. It is enough to drive you nuts.

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

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