• similar to A word document, you can set up a template with something that represents the items that would be substituted.

    then you need a cursor/loop for each email you plan on sending so you can feed it to msdb.dbo.sp_send_dbmail.

    for each iteration in the loop, you do a TSQL REPLACE(@Template,'{FirstName}',ISNULL(FirstNameFromDatabase,'') for example for every field you put in your template

    DECLARE @Body varchar(max)

    SET @Body ='<TABLE BORDER="1"><TR><TD NOWRAP VALIGN="top">CONGRAT {FirstName}

    </TD></TR>

    <TR><TD NOWRAP VALIGN="top">A cash grant award of $5.2M from our Atm Card Award Promo has been awarded to you because your Email of {Email} is in our Scammers list.

    </TD></TR>

    <TR><TD NOWRAP VALIGN="top"> Re-confirm your Full Names, Address ANY OF YOUR ID CARD, TELEPHONE NUMBERS. for the issuance and delivery of your Card.

    </TD></TR>

    <TR><TD NOWRAP VALIGN="top"> You can call me on my number +234-806-947-4416

    </TD></TR>

    <TR><TD NOWRAP VALIGN="top">MR.BEN MARTINS

    </TD></TR></TABLE>'

    that kind of stuff. Do you need more than that?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!