Friday, March 9, 2012

Mail Task in SSIS

Please help me i am new to ssis ....I am trying to send an email using mail task and I am sure that ISP works fine with smtp. I am entering all the correct information in the task but it takes a long time to run the task and then comes back with a failure error. can someone help me find an easy way to send an email to group of emails...I even tried to send it to 1 email and it is still not working.What error message do you get?|||

Thank you for the quick response....when I have the windows authontications on I don't get any email sent but when I uncheck that optiong I can only send emails withing exchange addresses and not any email address..is there a work around this...or do I have to use a script ...(if so can you please help me with the script)

thanks, Emad

|||Talk to your exchange server administrator - whether you need authentication, and why the server does not allow sending mails to outside people. SSIS is just a client that submits mails to server, we are testing that it can do it successfully, but what happens to the mail on the server is dependent on mail server configuration and completely outside of SSIS control.|||

use outlook client on the same machine (as SQL box) and see if you have the same problem, if the you have the same issue using outlook then this an exchange issue, if outlook can send it OK, then you have the investigate the problem on SQL.

you also can set up DatabaseMail in SQL 2005 and test the send mail process then use following T-SQL to send mail

sp_send_dbmail [ [ @.profile_name = ] 'profile_name' ]

[ , [ @.recipients = ] 'recipients [ ; ...n ]' ]

[ , [ @.copy_recipients = ] 'copy_recipient [ ; ...n ]' ]

[ , [ @.blind_copy_recipients = ] 'blind_copy_recipient [ ; ...n ]' ]

[ , [ @.subject = ] 'subject' ]

[ , [ @.body = ] 'body' ]

[ , [ @.body_format = ] 'body_format' ]

[ , [ @.importance = ] 'importance' ]

[ , [ @.sensitivity = ] 'sensitivity' ]

[ , [ @.file_attachments = ] 'attachment [ ; ...n ]' ]

[ , [ @.query = ] 'query' ]

[ , [ @.execute_query_database = ] 'execute_query_database' ]

[ , [ @.attach_query_result_as_file = ] attach_query_result_as_file ]

[ , [ @.query_attachment_filename = ] query_attachment_filename ]

[ , [ @.query_result_header = ] query_result_header ]

[ , [ @.query_result_width = ] query_result_width ]

[ , [ @.query_result_separator = ] 'query_result_separator' ]

[ , [ @.exclude_query_output = ] exclude_query_output ]

[ , [ @.append_query_error = ] append_query_error ]

[ , [ @.query_no_truncate = ] query_no_truncate ]

[ , [ @.mailitem_id = ] mailitem_id ] [ OUTPUT ]|||

use outlook client on the same machine (as SQL box) and see if you have the same problem, if the you have the same issue using outlook then this an exchange issue, if outlook can send it OK, then you have the investigate the problem on SQL.

you also can set up DatabaseMail in SQL 2005 and test the send mail process then use following T-SQL to send mail within SSIS

sp_send_dbmail [ [ @.profile_name = ] 'profile_name' ]

[ , [ @.recipients = ] 'recipients [ ; ...n ]' ]

[ , [ @.copy_recipients = ] 'copy_recipient [ ; ...n ]' ]

[ , [ @.blind_copy_recipients = ] 'blind_copy_recipient [ ; ...n ]' ]

[ , [ @.subject = ] 'subject' ]

[ , [ @.body = ] 'body' ]

[ , [ @.body_format = ] 'body_format' ]

[ , [ @.importance = ] 'importance' ]

[ , [ @.sensitivity = ] 'sensitivity' ]

[ , [ @.file_attachments = ] 'attachment [ ; ...n ]' ]

[ , [ @.query = ] 'query' ]

[ , [ @.execute_query_database = ] 'execute_query_database' ]

[ , [ @.attach_query_result_as_file = ] attach_query_result_as_file ]

[ , [ @.query_attachment_filename = ] query_attachment_filename ]

[ , [ @.query_result_header = ] query_result_header ]

[ , [ @.query_result_width = ] query_result_width ]

[ , [ @.query_result_separator = ] 'query_result_separator' ]

[ , [ @.exclude_query_output = ] exclude_query_output ]

[ , [ @.append_query_error = ] append_query_error ]

[ , [ @.query_no_truncate = ] query_no_truncate ]

[ , [ @.mailitem_id = ] mailitem_id ] [ OUTPUT ]|||

use outlook client on the same machine (as SQL box) and see if you have the same problem, if the you have the same issue using outlook then this an exchange issue, if outlook can send it OK, then you have the investigate the problem on SQL.

you also can set up DatabaseMail in SQL 2005 and test the send mail process then use following sp_send_dbmail within SSIS as T-SQL command.

No comments:

Post a Comment