Sending multiple emails

  • Hi guys, i have an issue i hope someone can help me with. I need to send multiple emails to recipients one at a time what is the best way to do this?

    for example i do a select statement to get 5 email addresses, now i need to be able to fire off an email with verbiage to each one of them separately. The reason they have to be separate is in the verbiage i need to have there name in the 'Dear Jondoe1,' Here is my second dilemma. How would you insert a name in the verbiage for each email?

    jondoe1@gmail.com

    jondoe2@gmail.com

    jondoe3@gmail.com

    jondoe4@gmail.com

    jondoe5@gmail.com

  • Short answer: Drop off the email and the name into an ADO Recordset object from a dataflow (feed your select statement into a recordset target).

    Use that object variable as the source of a for each loop in the control flow.

    Finally, in your email, use an expression to bring the variable into the text stream for the body portion of the email.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Evil Kraig F (10/9/2014)


    Short answer: Drop off the email and the name into an ADO Recordset object from a dataflow (feed your select statement into a recordset target).

    Use that object variable as the source of a for each loop in the control flow.

    Finally, in your email, use an expression to bring the variable into the text stream for the body portion of the email.

    Thanks for the reply! Little lost on how this works but will try.

Viewing 3 posts - 1 through 2 (of 2 total)

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