SSIS SEND MAIL TASK EXCEL ATTACHMENT TIME OUT ERROR

  • HI !

    I need help to fix SSIS Send Mail Task Error.

    I have a

    Data Flow

    Read from Sql Data base and then put the query result into excel file

    (OLE DB Source --> Excel Destination)

    Send Mail Task

    Email excel file from the data flow

    Control Flow :

    Data Flow --> Send Mail Task

    The package throws an error below. I tried to disable my antivirus because i thought it's throwing an error because of the antivirus.

    But, it's still throwing the same error. If i tried to send email without attachment, it works just fine.

    Is there anybody know how to fix this?

    Progress: The SendMail task is initiated. - 0 percent complete

    [Send Mail Task] Error: An error occurred with the following error message: "The operation has timed out.".

    Progress: The SendMail task is completed. - 100 percent complete

    Task Send Mail Task failed

  • Hello,

    I hope you got the solution to it. I have similar requirement and I am new to SSIS. Can you please share some knowledge on it as to how to create and deploy it?

    Your help will be very much appreciated.

    Thank you.

  • Any news on the fix???

    I got this error on a job that ran last night ...

    All of a sudden it doesn't want to send mails with attachments :blink:

    I tested with and without attachments and well it happily executes without any attachments ...

    Nothing has changed, via antivirus, patches, SSIS changes or anything on the server ...

    MCITP: Database Administrator 2005
    MCTS SQL Server 2008
    MCP SQL 2012/2014
    MCSA SQL Server 2012/2014
    MCSE Data Management and Analytics

  • Hi,

    Is the size of attachment too big that it exceeds the sending limit. What if for testing purposes send the results to a text file and try sending the e-mail

    Thank you

  • The problem is fixed, there was a delay on the mail server which caused the timeout error...

    So nothing on the SSIS side but the actual mail server issues ...

    Tip ... Check the Mail server first if there is delays on mails before disecting your SSIS package especially if it was working before πŸ˜‰

    MCITP: Database Administrator 2005
    MCTS SQL Server 2008
    MCP SQL 2012/2014
    MCSA SQL Server 2012/2014
    MCSE Data Management and Analytics

  • I think this has nothing to do with the SMTP server delays. I have done send mail with a small .xls zipped to just less than 2 meg and another about 9 meg. The larger fails each time, while the smaller runs successfully each time...

    Error Message in SSIS:

    [Send Mail Task] Error: An error occurred with the following error message: "The operation has timed out.".

  • Any solution to this yet!!! I have got the same problem....I am able to send small files...but Its timing out for the large files say like 3MB....but SMTP server allows 5MB max file size...any more ideas ??

  • ya know, after reading the post prior to mine, it could be that the time out setting for SMTP is too low to allow enough time to send the file...even if the size setting would otherwise allow for it. ...that's probably what they meant all along, but I missed the point....I think

    so try increasing the timeout limit.....

  • hi,

    where do you set that timeout? or is there another way of delaying the Send Mail Task. Mine fails because the SSIS package fires in rapid succession with following error

    Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: "Service not available, closing transmission channel. The server response was: Error: too many messages in one session".

  • This worked out for me, delaying it for 15 seconds (15000 milliseconds)

    ' Microsoft SQL Server Integration Services Script Task

    ' Write scripts using Microsoft Visual Basic

    ' The ScriptMain class is the entry point of the Script Task.

    Imports System

    Imports System.Data

    Imports System.Math

    Imports Microsoft.SqlServer.Dts.Runtime

    Public Class ScriptMain

    ' The execution engine calls this method when the task executes.

    ' To access the object model, use the Dts object. Connections, variables, events,

    ' and logging features are available as static members of the Dts class.

    ' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.

    '

    ' To open Code and Text Editor Help, press F1.

    ' To open Object Browser, press Ctrl+Alt+J.

    Public Sub Main()

    '

    ' Add your code here

    '

    Threading.Thread.Sleep(15000)

    Dts.TaskResult = Dts.Results.Success

    End Sub

    End Class

  • well, it was working but now again it konks out with same error. Now using a SQL Task with waitfor delay '000:00:30'

  • I ran into the same issue as i can send emails with attachments < 1 MB but not more than 1MB.

    Everything looks good in Sysmail_**** views. Status column is set to SEND in sysmail_allitems view.

    After troubleshooting with our SA – I have found out that there was issue in exchange Server which was clogging for some reasons.

    Pls check on exchange server and SMTP Settings change. It’s not an issue on SQL Server side.

Viewing 12 posts - 1 through 11 (of 11 total)

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