Sending Email

  • Hi all

    I have a template thats been given to me and it contains an image with a link to the site. I need to send this to about 5000 users. I have a database with the names and emails of these people..

    Can some one please advise on how to send this email via SSIS so i can schedule a job at some godly hours

    Thanks

    Vani

  • Hi all

    Never mind I got it worked out 🙂

  • Can you please share your approach

    Raunak J

  • Hey,

    Can you please share your approach to users.it will be very useful to the all sql developers and users

  • Hi all

    Sorry forgot to do that bit 🙂

    Steps -

    A table created in SQL Server with the rows of data imported (i.e. Name and Email Address) since there was nothing unique to identify the rows in here - In the table I had created an additional column cntr (data type Int) this was 0 when the data was initially imported.

    I ran an update statement ones the data was imported to add a number for each row in the cntr column (so the first row had a number 1 and the last row had the no of 5000). This helped to identify each row uniquely as needed

    Created an SSIS package - The first part was to have an Exec Task with a Select Statement - That only took the cntr in and returned the values into an object variable (in this case i called it cntdet) . Note - variable cntdet created at package level and had the Object as datatype

    Then created a loop which enumerated through the Object Variable and took the email address and name and this was stored in two variables of string type

    I created a script task with the script there for the HTML message added the script to the loop

    This is how i created it...

    I will post a document with Screenshots explaining shortly - I believe screenshots can help learn better... 🙂

    Thanks to a document that was in the forum here that helped me with this...

    Cheers

    Vani

  • Hi vani,

    Can you please post the document which helped you acheive this.

    thanks

    Kevin.

  • Hi all

    Please find attached my solution... its a long winded way but it works...

    Cheers

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply