Results 1 to 7 of 7

Thread: email reports

  1. #1
    Join Date
    Oct 2002
    Location
    Chicago
    Posts
    38

    Unhappy email reports

    Hi,

    We get lots of work requests to send out emails using diferent accounts ohter than sql service email account.
    e.g. Our sql notification emails are sent from 'enrollnotify@cnsinc.com'.

    The requirement is to run the queries, capture student name and enrollment info and send out emails to the students from 'success@cnsinc.com' or 'reminder@cnsinc.com' or other accounts like this depending upon the business group request.

    What is the proper way to do it without stopping and restarting email services all the time? Are there any third party of Microsoft tool available to accopmlish this in sql server? We use sql 2000 sp3 standard version.

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254

  3. #3
    Join Date
    Oct 2002
    Location
    Chicago
    Posts
    38
    Hi MAK,

    I usually run the procedures with to capture the data. Once I have data, I have to create customized emails like

    'Dear <student_name>,

    Your license is going to expire on <specific date>..

    etc

    No of emails to be sent out varies from 5 to 5000.

    Do you think using CDOSYS procedure help me with this?

    I am still doubtful that the entire project can be done using only sql server.

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can use CDOSYS object from transact sql to do this.

  5. #5
    Join Date
    Aug 2003
    Posts
    15

    Package Again

    Hey,

    U can create a package. Run all ur queries, get the data using activex script. (vbscript) and change the data being populated in the email component.

    Check it out. I guess its the best thing to do!

    Ketan

  6. #6
    Join Date
    Aug 2003
    Posts
    15

    Package Again

    Reading ur question again I got this idea.

    1. Have a table to contain the email addresses in it. With a flag which would mean that the record should be deleted once an email is sent
    2. Have the query that needs to be executed as a part of this table.

    So when the business group needs to get a certain kind of data and needs to send it to say x number of email addressed. you populate the table with some front end

    3. write an activex script that will read the table. take the sql script and execute it. Get the result set and populate email content. Mail it and delete the email address from the table depending on the flag.

    This will make the applciation dynamic. so that you can change the queries and the email addresses anytime.

    Let me know what u think!
    Ketan

  7. #7
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Too many process involved if it is a DTS package.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •