SELECT
SMTPServer, SMTPPort
FROM Def_RemoteConnections
WHERE
Remote LIKE '{remote_connection}'
AND COALESCE(Package, 'CORE') in ('{package}','CORE','')
LIMIT 1
SELECT
UserName, RemotePassword, PopServer
FROM
Def_RemoteConnections
WHERE
Remote LIKE '{remote_connection}'
AND COALESCE(Package, 'CORE') IN ('{package}', 'CORE', '')
LIMIT 1
SELECT
MailConnection
FROM
`{def_table}`
WHERE
Channel LIKE '{channel}'
AND IFNULL(Package, 'CORE') = '{package}'
Update Email_Stage set Reply = '{reply}'
,ReplyFrom = '{reply_from}', Timereplied = now()
,Status = 'REPLIED' where Guid = '{guid}'
- envelope_html: `
{html_content}
`