Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Looking for ActiveX mail sending task

Posted on 2009-04-13
13
Medium Priority
?
314 Views
Last Modified: 2013-11-30
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.
0
Comment
Question by:Nathan Riley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
13 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24134321
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
 
LVL 12

Author Comment

by:Nathan Riley
ID: 24139060
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24140451
What email protocol are you using (SMTP, MAPI, something else)?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 12

Author Comment

by:Nathan Riley
ID: 24140457
SMTP
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24140471
And can you successfully send email from SQL Server (outside of DTS)?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24140497
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
 
LVL 12

Author Comment

by:Nathan Riley
ID: 24141673
Yeah that looks like it would work, but I need this in a ActiveX script
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24143691
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
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 24154348
Why do you need to use an ActiveX script rather than an execute SQL task?
0
 
LVL 12

Author Comment

by:Nathan Riley
ID: 24186122
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24186820
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
 
LVL 12

Author Comment

by:Nathan Riley
ID: 24186885
I don't have a problem doing that, but I'm unfamiliar with the process.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 2000 total points
ID: 24190382
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

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question