Looking for ActiveX mail sending task

I'm looking for a ActiveX script that will let me send mail.  I tried using the sendmail task in DTS, but the problem is that everyday that the file is generated it has the date appended to the filename, so I don't think the sendmail task will work.
LVL 12
Nathan RileyFounderAsked:
Who is Participating?
 
Anthony PerkinsCommented:
1. You Create a Global Variable called say "FileName"
2. In your ActiveX Script Task you assign the value of the FileName to that Global Variable as in:
DTSGlobalVariables("FileName").Value = YourValueGoesHere
3. Pass the Global Variable in to the Stored Procedure or T-SQL as in:
Global Variables and Stored Procedure Parameters
http://www.sqldts.com/234.aspx
0
 
Anthony PerkinsCommented:
Can you see how your question makes no sense what so ever?

What is the core problem?  Is it:
A. You cannot send mail ("I'm looking for a ActiveX script that will let me send mail") or
B. You can send mail but teh file name is different and you do not know how to get the file name ("the problem is that everyday that the file is generated it has the date appended to the filename") or
C. Something else.
0
 
Nathan RileyFounderAuthor Commented:
Ok, sorry it didn't make sense, what I need is the following::

1. I need a ActiveX script that will send an e-mail, if it is possible to do
2. The send mail task will not work in DTS for what I'm trying to accomplish
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Anthony PerkinsCommented:
What email protocol are you using (SMTP, MAPI, something else)?
0
 
Nathan RileyFounderAuthor Commented:
SMTP
0
 
Anthony PerkinsCommented:
And can you successfully send email from SQL Server (outside of DTS)?
0
 
Anthony PerkinsCommented:
Here is what you can use:
XPSMTP.DLL - SQL Server SMTP Mail XP
http://www.sqldev.net/xp/xpsmtp.htm

It then becomes a simple Execute SQL task in DTS to send email.
0
 
Nathan RileyFounderAuthor Commented:
Yeah that looks like it would work, but I need this in a ActiveX script
0
 
Anthony PerkinsCommented:
Then you will have to install (if it is not already installed) CDO or CDONTS:
1. On the server if the DTS package is to be scheduled or
2. On the workstation that executes the DTS package, otherwise.

Since I have no experience with either one (nor would I consider using it), I suggest you search for information on how to use them.
0
 
nmcdermaidCommented:
Why do you need to use an ActiveX script rather than an execute SQL task?
0
 
Nathan RileyFounderAuthor Commented:
B/c the name of the file that I'm trying to get is name with the date.  I know how to get a file via Activex script when the filename chages that way, so I wanted to also e-mail the file the same way.
0
 
Anthony PerkinsCommented:
So pray tell why not use the same ActiveX to set a DTS Global Variable that can be passed as in Input parameter to a Stored Procedure?
0
 
Nathan RileyFounderAuthor Commented:
I don't have a problem doing that, but I'm unfamiliar with the process.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.