Title: How to add unsubscribe header? · Issue #1045 · sendgrid/sendgrid-python · GitHub
Open Graph Title: How to add unsubscribe header? · Issue #1045 · sendgrid/sendgrid-python
X Title: How to add unsubscribe header? · Issue #1045 · sendgrid/sendgrid-python
Description: Issue Summary I'm trying to add an unsubscribe header and the docs are not very clear, then tech support told me to ask here ... Here is my code from Django 3.9, which is working fine: from sendgrid import SendGridAPIClient from sendgrid...
Open Graph Description: Issue Summary I'm trying to add an unsubscribe header and the docs are not very clear, then tech support told me to ask here ... Here is my code from Django 3.9, which is working fine: from sendgri...
X Description: Issue Summary I'm trying to add an unsubscribe header and the docs are not very clear, then tech support told me to ask here ... Here is my code from Django 3.9, which is working fine: from sen...
Mail addresses
sendgridtesting@gmail.com
from@example.net
sendgridtesting@gmail.com
from@example.net
Opengraph URL: https://github.com/sendgrid/sendgrid-python/issues/1045
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to add unsubscribe header?","articleBody":"### Issue Summary\r\nI'm trying to add an unsubscribe header and the docs are not very clear, then tech support told me to ask here ...\r\n\r\nHere is my code from Django 3.9, which is working fine:\r\n\r\n```\r\n from sendgrid import SendGridAPIClient\r\n from sendgrid.helpers.mail import Mail, To\r\n\r\n for lead_page in lead_paginator.page_range:\r\n sents = sents + '----------------lead_page: ' + str(lead_page)\r\n to_emails = []\r\n for lead in lead_paginator.page(lead_page).object_list:\r\n pixel_url = 'e=' + lead.lead_email + '&s=' + e_archive.subject_slug\r\n\r\n one_to_email = To(email=lead.lead_email,\r\n name=lead.first_name,\r\n substitutions={\r\n '\u003c\u003c first_name >>': first,\r\n '\u003c\u003c pixel_url >>': pixel_url\r\n },\r\n subject=e_archive.subject)\r\n\r\n to_emails.append(one_to_email)\r\n\r\n message = Mail(\r\n from_email=('xxxxx@xxxxx.com', 'xxxxx'),\r\n to_emails=to_emails,\r\n subject=e_archive.subject,\r\n html_content=e_html,\r\n is_multiple=True)\r\n\r\n```\r\nSo where do I add an unsubscribe header based off of the pixel_url, so its personalized; something like:\r\n\r\n```\r\n \"headers\": {\r\n \"List-Unsubscribe\": \"\u003chttps://xxxxx.com/download/?\u003c\u003c pixel_url >>&p=unsubscribe>\"\r\n }\r\n```\r\n\r\n","author":{"url":"https://github.com/addsimm","@type":"Person","name":"addsimm"},"datePublished":"2022-02-17T23:45:55Z","url":"https://github.com/sendgrid/sendgrid-python/issues/1045"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:454300d8-a4d0-147c-0ce2-7b12c1141fcc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA76:D7A7C:80571F:A67704:6B062D0D |
| html-safe-nonce | d6e5839acd57a50bbbb309b3b67d95120cf28041e45eafc0a122a23b5cb4349f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTc2OkQ3QTdDOjgwNTcxRjpBNjc3MDQ6NkIwNjJEMEQiLCJ2aXNpdG9yX2lkIjoiNjIyNDA5MTc0NjE1NTI0NDgxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fd716303c16c78188238996b71935b54748b91064c724ac38ff754fe2ef87970 |
| hovercard-subject-tag | issue:1142080394 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sendgrid/sendgrid-python/1045/issue_layout |
| twitter:image | https://opengraph.githubassets.com/afc0f0de04733f7c72d9f581f2199e30a90a86c8073317401b00f44f9e13567d/sendgrid/sendgrid-python/issues/1045 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/afc0f0de04733f7c72d9f581f2199e30a90a86c8073317401b00f44f9e13567d/sendgrid/sendgrid-python/issues/1045 |
| og:image:alt | Issue Summary I'm trying to add an unsubscribe header and the docs are not very clear, then tech support told me to ask here ... Here is my code from Django 3.9, which is working fine: from sendgri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | addsimm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/sendgrid/sendgrid-python git https://github.com/sendgrid/sendgrid-python.git |
| octolytics-dimension-user_id | 181234 |
| octolytics-dimension-user_login | sendgrid |
| octolytics-dimension-repository_id | 3546794 |
| octolytics-dimension-repository_nwo | sendgrid/sendgrid-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3546794 |
| octolytics-dimension-repository_network_root_nwo | sendgrid/sendgrid-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width