xp_smtp_sendmail - Unable to send to groups

I use xp_smtp_sendmail to send e-mail messages with attached files on a monthly basis via a scheduled dts package within SQL 2000.  I can successfully send to individuals (i.e. jdoe@company.com), however, if I try to send to a group I am not successful.  Even when I use the SMTP address for that group (i.e. IT@company.com is the SMTP address for the Information Technology mail group).  The message will not send even though the return code returns success.  Included is the SQL statement contained in the execute sql task of the
dts package.

Does anyone have any suggestions?  Thanks.

declare @rc int,
    @Month AS CHAR(2),
    @Year AS CHAR(4),
    @Message_Text AS CHAR(500)

SET @Month = MONTH(DATEADD(M,1,GETDATE()))
SET @Year =  YEAR(DATEADD(M,1,GETDATE()))
SET @Message_Text = 'This is only a test.'

exec @rc = master.dbo.xp_smtp_sendmail
    @FROM                   = N'DoNotReply@tfsi1.com',
    @FROM_NAME        = N'TFS Information Systems',
    @TO                     = N'IT@tfsi1.com',
    @priority               = N'HIGH',
    @subject                = N'This is a Test',
    @message                = @Message_Text,    
    @type                   = N'text/plain',
    @server                 = N'TFSMAIL'
select
      RC = @rc
LVL 1
tfsaccountAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anthony PerkinsCommented:
We do this all the time, so it has to be something other than xp_smtp_sendmail.  Check the SMTP logs for any clues as to the problem.
0
tfsaccountAuthor Commented:
Here is the situation.
We have Exchange as our mail server.  If, while I am at work, I fire up Microsoft Office Outlook and then send an email to "finance@company.com" exchange will send an email to each of the users who belong to the exchange group "finance".  When the finance people see the email the TO will be "finance@company.com" with a little + sign next to it and they can expand the Plus to see all of the people in the group.

If I log in from home and send an email to "finance@company.com" nothing happens, nobody gets an email. Perhaps the groups only work when sending mail from within the network or while you are logged into Outlook.

The reason why I would want to send to the group is so that I dont have to hard-code the list of finance people in the DTS package.  Lets say that every Monday I have a job that runs and all of finance would like to have an email notification of the job.  If I hard code the list of people it would just be a pain in the butt to manage that.  

Do you know how to send an email from SQL which then gets sent to everyone in the gorup?

Thanks!

0
Anthony PerkinsCommented:
Again we do this all the time using xp_smtp_sendmail.  Namely send an email to a Distributon List. We send out around 10 to 50 a day.  The only way you are going to get to the bottom of this is looking at the logs.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.