aboutsummaryrefslogtreecommitdiffstats
path: root/python/email_ctm.py
blob: 2be8c2e27110ca8ad5756e903b4b53bea2a8d70f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from serenitas.utils.db import dbconn
from serenitas.utils.exchange import ExchangeMessage

conn = dbconn("dawndb")
email_text = """Our firm LMCG Investments is currently working with DTCC to implement DTCC Central Trade Manager – DTCC’s  global solution for central matching and confirmation.  As part of the implementation effort, your firm has been identified as a key broker partner. 

Our firm will begin using Omgeo CTM to create electronic trade confirmations for fixed income trades.  LMCG Investments BIC is LMCGUS31.  Does your firm currently use CTM?  If so can you please provide your CTM BIC code 

Thank you
"""
sql_query = "SELECT name, allocation_contacts FROM counterparties c WHERE cash_counterparty AND allocation_contacts IS NOT null AND code NOT IN ('SCOTIA', );"
with conn.cursor() as c:
    c.execute(sql_query)
    em = ExchangeMessage()
    for row in c:
        em.send_email(
            f"*Response Requested* CTM Setup {row.name} -  LMCG Investments",
            email_text,
            to_recipients=row.allocation_contacts,
            cc_recipients=("fyu@lmcg.com", "jreha@lmcg.com"),
        )