Set trucking campaign Reply-To header
This commit is contained in:
parent
ef79e85b41
commit
f42833cc9d
2 changed files with 6 additions and 0 deletions
|
|
@ -151,6 +151,8 @@ TIMEZONE_CONFIG = {
|
|||
|
||||
# Owner email — test sends go here before each campaign is scheduled
|
||||
TEST_EMAIL = os.getenv("CAMPAIGN_TEST_EMAIL", "carrierone@gmx.com")
|
||||
REPLY_TO_EMAIL = os.getenv("CAMPAIGN_REPLY_TO", "info@performancewest.net")
|
||||
REPLY_TO_HEADERS = [{"name": "Reply-To", "value": REPLY_TO_EMAIL}]
|
||||
|
||||
USABLE_FILTER = (
|
||||
"(email_verified IS TRUE OR email_verify_result IN "
|
||||
|
|
@ -258,6 +260,7 @@ def create_and_schedule_campaign(
|
|||
"template_id": base["template_id"],
|
||||
"tags": base.get("tags") or [],
|
||||
"messenger": base.get("messenger") or "email",
|
||||
"headers": base.get("headers") or REPLY_TO_HEADERS,
|
||||
}
|
||||
if schedule:
|
||||
payload["send_at"] = send_at_utc.strftime("%Y-%m-%dT%H:%M:%S+00:00")
|
||||
|
|
@ -301,6 +304,7 @@ def send_test(base: dict, campaign_id: int, sample_row: tuple, label: str, tz: s
|
|||
"body": body, "altbody": base.get("altbody"),
|
||||
"template_id": base["template_id"],
|
||||
"tags": base.get("tags") or [], "messenger": base.get("messenger") or "email",
|
||||
"headers": base.get("headers") or REPLY_TO_HEADERS,
|
||||
"subscribers": [TEST_EMAIL],
|
||||
}
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue