René's URL Explorer Experiment


Title: Commas in recipient name cause mail to be silently dropped (worked in v2) · Issue #291 · sendgrid/sendgrid-python · GitHub

Open Graph Title: Commas in recipient name cause mail to be silently dropped (worked in v2) · Issue #291 · sendgrid/sendgrid-python

X Title: Commas in recipient name cause mail to be silently dropped (worked in v2) · Issue #291 · sendgrid/sendgrid-python

Description: Issue Summary When sending a message, if a recipient name contains a comma, the send appears to succeed but the message ends up with a "dropped" status and is never delivered. The equivalent code worked correctly (successfully delivered ...

Open Graph Description: Issue Summary When sending a message, if a recipient name contains a comma, the send appears to succeed but the message ends up with a "dropped" status and is never delivered. The equivalent code w...

X Description: Issue Summary When sending a message, if a recipient name contains a comma, the send appears to succeed but the message ends up with a "dropped" status and is never delivered. The equival...

Opengraph URL: https://github.com/sendgrid/sendgrid-python/issues/291

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Commas in recipient name cause mail to be silently dropped (worked in v2)","articleBody":"#### Issue Summary\r\n\r\nWhen sending a message, if a recipient `name` contains a comma, the send appears to succeed but the message ends up with a \"dropped\" status and is never delivered.\r\n\r\nThe equivalent code worked correctly (successfully delivered the message -- including the comma in the recipient's display-name) with the v2 send API.\r\n\r\nI'm aware the [v3 send docs](https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html#-Limitations) indicate you can't include commas or semicolons (or -- erroneously, periods) in recipient names. But there are many legitimate cases where a display-name would include a comma. And since commas *are* allowed (and work) in the from_email name, it's confusing that the v3 API wouldn't be properly quoting recipient display-names like the v2 API did.\r\n\r\n\r\n#### Steps to Reproduce\r\n\r\n1. Test with v3 API:\r\n\r\n   `pip install sendgrid==3.6.3` (current version as of this report) and run this code:\r\n\r\n   ```python\r\n   import os\r\n   import sendgrid\r\n   from sendgrid.helpers.mail import Mail, Email, Content\r\n   \r\n   sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))\r\n   mail = Mail(\r\n       from_email=Email(\"widgets-inc@example.com\", \"Widgets, Inc.\"),\r\n       to_email=Email(\"ckaes@sink.sendgrid.net\", \"Mr. Craig Kaes, SVP Eng.\"),\r\n       subject=\"Sent using v3 API\",\r\n       content=Content(\"text/plain\", \"Body\"),\r\n   )\r\n   response = sg.client.mail.send.post(request_body=mail.get())\r\n   print(response.status_code, response.body)  # (202, '')\r\n   ```\r\n\r\n   Results: `(202, '')` (send accepted; no apparent error)\r\n\r\n2. Find the message in your SendGrid [activity feed](https://app.sendgrid.com/email_activity).\r\n\r\n   Results: The message has been dropped (and displays the confusing email address \"mr.craig\"):\r\n   \u003cimg width=\"225\" alt=\"screen shot 2017-01-17 at 11 58 29 am\" src=\"https://cloud.githubusercontent.com/assets/639984/22037518/4c9054d0-dcac-11e6-83fb-6d8ba4a99c71.png\">\r\n   Expected: The message should have been processed and delivered\r\n\r\n3. Now remove the comma from the `to_email` -- but leave it in the `from_email`, and send again.\r\n\r\n   Results: Message is processed and delivered, with the comma intact in the `from_email` display-name. (This demonstrates that the v3 API correctly handles commas in names in *some* cases. So the code to properly escape and quote names must exist somewhere in the v3 API.)\r\n\r\n4. Now test with the v2 send API:\r\n\r\n   `pip install sendgrid==2.2.1` (last release using v2 send) and run this code -- the equivalent of the v3 example above:\r\n\r\n   ```python\r\n   import os\r\n   import sendgrid\r\n   \r\n   sg = sendgrid.SendGridClient(os.environ.get('SENDGRID_API_KEY'))\r\n   message = sendgrid.Mail(\r\n       from_email=\"widgets-inc@example.com\",\r\n       from_name=\"Widgets, Inc.\",\r\n       to=\"ckaes@sink.sendgrid.net\",\r\n       to_name=\"Mr. Craig Kaes, SVP Eng.\",\r\n       subject=\"Sent using v2 API\",\r\n       text=\"Body\",\r\n   )\r\n   status, msg = sg.send(message)\r\n   print(status, msg)  # (200, '{\"message\":\"success\"}')\r\n   ```\r\n\r\n   Results: The message is processed and delivered, with the comma in the recipient's display-name intact. The activity feed confirms:\r\n   \u003cimg width=\"279\" alt=\"screen shot 2017-01-17 at 12 11 14 pm\" src=\"https://cloud.githubusercontent.com/assets/639984/22037946/1828787e-dcae-11e6-8327-27621d0a78a6.png\">\r\n\r\n\r\n#### Technical details:\r\n\r\n* sendgrid-python Version: as identified in examples above\r\n* Python Version: 2.7.12","author":{"url":"https://github.com/medmunds","@type":"Person","name":"medmunds"},"datePublished":"2017-01-17T20:16:50Z","url":"https://github.com/sendgrid/sendgrid-python/issues/291"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1be32a0f-9fa7-ab03-8eec-a6aa1c7ae02d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8FBC:1087D4:2A06EAC:382F8CD:6B01C543
html-safe-nonce0d6cf479eb25ccc3b4fa9cbaab91b01f8feaf1d358825c3b29fc0bffc8b5d48e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkJDOjEwODdENDoyQTA2RUFDOjM4MkY4Q0Q6NkIwMUM1NDMiLCJ2aXNpdG9yX2lkIjoiNDk5OTE1ODA2MjQ5NDM2OTA5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2a5bd27aeee9327b76c2f79a83e1edf23c981b240a8647482374ed32f764b8bb
hovercard-subject-tagissue:201393954
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sendgrid/sendgrid-python/291/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f7a17b3acfde8ec059c3e1f7e633e2a00fc1572f67c57ba3b92783f57ba4f861/sendgrid/sendgrid-python/issues/291
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f7a17b3acfde8ec059c3e1f7e633e2a00fc1572f67c57ba3b92783f57ba4f861/sendgrid/sendgrid-python/issues/291
og:image:altIssue Summary When sending a message, if a recipient name contains a comma, the send appears to succeed but the message ends up with a "dropped" status and is never delivered. The equivalent code w...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemedmunds
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/sendgrid/sendgrid-python git https://github.com/sendgrid/sendgrid-python.git
octolytics-dimension-user_id181234
octolytics-dimension-user_loginsendgrid
octolytics-dimension-repository_id3546794
octolytics-dimension-repository_nwosendgrid/sendgrid-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3546794
octolytics-dimension-repository_network_root_nwosendgrid/sendgrid-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/sendgrid/sendgrid-python/issues/291#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsendgrid%2Fsendgrid-python%2Fissues%2F291
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsendgrid%2Fsendgrid-python%2Fissues%2F291
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=sendgrid%2Fsendgrid-python
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/291
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/291
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/291
sendgridhttps://github.com/sendgrid
sendgrid-pythonhttps://github.com/sendgrid/sendgrid-python
Codehttps://github.com/sendgrid/sendgrid-python
Issues50 (50)https://github.com/sendgrid/sendgrid-python/issues
Pull requests17 (17)https://github.com/sendgrid/sendgrid-python/pulls
Actionshttps://github.com/sendgrid/sendgrid-python/actions
Security and qualityhttps://github.com/sendgrid/sendgrid-python/security
Insightshttps://github.com/sendgrid/sendgrid-python/insights
https://github.com/sendgrid/sendgrid-python
New issuehttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/291
New issuehttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/291
Commas in recipient name cause mail to be silently dropped (worked in v2)https://github.com/sendgrid/sendgrid-python/issues/291#top
difficulty: unknown or n/afix is unknown in difficultyhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22difficulty%3A%20unknown%20or%20n%2Fa%22
status: help wantedrequesting help from the communityhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22status%3A%20help%20wanted%22
type: non-library issueAPI issue not solvable via the SDKhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20non-library%20issue%22
https://github.com/medmunds
medmundshttps://github.com/medmunds
on Jan 17, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issue-201393954
v3 send docshttps://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html#-Limitations
activity feedhttps://app.sendgrid.com/email_activity
https://cloud.githubusercontent.com/assets/639984/22037518/4c9054d0-dcac-11e6-83fb-6d8ba4a99c71.png
https://cloud.githubusercontent.com/assets/639984/22037946/1828787e-dcae-11e6-8327-27621d0a78a6.png
Nexthttps://github.com/sendgrid/sendgrid-python/issues/291?timeline_page=1
medmundshttps://github.com/medmunds
on Jan 18, 2017https://github.com/sendgrid/sendgrid-python/issues/291#event-928151245
SendGrid: work around v3 API name quoting bughttps://github.com/anymail/django-anymail/commit/f51127f95208b333d06cf096431ecfe288fd86d6
f51127fhttps://github.com/anymail/django-anymail/commit/f51127f95208b333d06cf096431ecfe288fd86d6
https://github.com/medmunds
medmundshttps://github.com/medmunds
on Jan 23, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-274628563
sendgrid/sendgrid-csharp#268https://github.com/sendgrid/sendgrid-csharp/issues/268
sendgrid/sendgrid-ruby#77https://github.com/sendgrid/sendgrid-ruby/issues/77
https://github.com/thinkingserious
thinkingserioushttps://github.com/thinkingserious
on Jan 24, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-274954406
@medmundshttps://github.com/medmunds
thinkingserioushttps://github.com/thinkingserious
type: questionquestion directed at the libraryhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20question%22
on Jan 24, 2017https://github.com/sendgrid/sendgrid-python/issues/291#event-935279299
https://github.com/sbglasius
sbglasiushttps://github.com/sbglasius
on Mar 15, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-286860887
https://github.com/thinkingserious
thinkingserioushttps://github.com/thinkingserious
on Mar 15, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-286861581
@sbglasiushttps://github.com/sbglasius
https://github.com/sbglasius
sbglasiushttps://github.com/sbglasius
on Mar 15, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-286870365
https://github.com/thinkingserious
thinkingserioushttps://github.com/thinkingserious
on Mar 15, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-286870826
@sbglasiushttps://github.com/sbglasius
https://github.com/medmunds
medmundshttps://github.com/medmunds
on Mar 16, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-287205095
suggested in the C# issuehttps://github.com/sendgrid/sendgrid-csharp/issues/268#issuecomment-232177443
email.utils.quotehttps://docs.python.org/3/library/email.util.html#email.utils.quote
https://github.com/thinkingserious
thinkingserioushttps://github.com/thinkingserious
on Mar 17, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-287418901
@medmundshttps://github.com/medmunds
sendgrid/sendgrid-php#368https://github.com/sendgrid/sendgrid-php/issues/368
thinkingserioushttps://github.com/thinkingserious
type: non-library issueAPI issue not solvable via the SDKhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20non-library%20issue%22
type: questionquestion directed at the libraryhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20question%22
on Apr 28, 2017https://github.com/sendgrid/sendgrid-python/issues/291#event-1061390229
thinkingserioushttps://github.com/thinkingserious
difficulty: easyfix is easy in difficultyhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22difficulty%3A%20easy%22
hacktoberfesthttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22hacktoberfest%22
on Sep 30, 2017https://github.com/sendgrid/sendgrid-python/issues/291#event-1272801842
https://github.com/sreeram123
sreeram123https://github.com/sreeram123
on Oct 16, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-336782786
mbernierhttps://github.com/mbernier
difficulty: mediumfix is medium in difficultyhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22difficulty%3A%20medium%22
difficulty: very hardfix is very hard in difficultyhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22difficulty%3A%20very%20hard%22
on Oct 27, 2017https://github.com/sendgrid/sendgrid-python/issues/291#event-1314314456
https://github.com/medmunds
medmundshttps://github.com/medmunds
on Oct 27, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-340097963
SendGrid's docshttps://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html#-Limitations
email.utils.quotehttps://docs.python.org/3/library/email.util.html#email.utils.quote
what I usedhttps://github.com/anymail/django-anymail/blob/v1.0/anymail/backends/sendgrid.py#L205-L210
https://github.com/gabrielkrell
gabrielkrellhttps://github.com/gabrielkrell
on Nov 1, 2017https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-341005216
@medmundshttps://github.com/medmunds
According to Elmerhttps://github.com/sendgrid/sendgrid-php/issues/368#issuecomment-287418109
https://github.com/kirk-quinbar
kirk-quinbarhttps://github.com/kirk-quinbar
on Feb 2, 2018https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-362626731
https://github.com/thinkingserious
thinkingserioushttps://github.com/thinkingserious
on Feb 6, 2018https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-363597209
@kirk-quinbarhttps://github.com/kirk-quinbar
thinkingserioushttps://github.com/thinkingserious
status: help wantedrequesting help from the communityhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22status%3A%20help%20wanted%22
difficulty: unknown or n/afix is unknown in difficultyhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22difficulty%3A%20unknown%20or%20n%2Fa%22
difficulty: easyfix is easy in difficultyhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22difficulty%3A%20easy%22
hacktoberfesthttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22hacktoberfest%22
on Feb 27, 2018https://github.com/sendgrid/sendgrid-python/issues/291#event-1495491656
thinkingserioushttps://github.com/thinkingserious
hacktoberfesthttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22hacktoberfest%22
on Oct 5, 2018https://github.com/sendgrid/sendgrid-python/issues/291#event-1887253406
childish-sambinohttps://github.com/childish-sambino
hacktoberfesthttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22hacktoberfest%22
on Aug 20, 2020https://github.com/sendgrid/sendgrid-python/issues/291#event-3676657585
https://github.com/eshanholtz
eshanholtzhttps://github.com/eshanholtz
on Sep 2, 2020https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-685198576
eshanholtzhttps://github.com/eshanholtz
completedhttps://github.com/sendgrid/sendgrid-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 2, 2020https://github.com/sendgrid/sendgrid-python/issues/291#event-3717290093
https://github.com/medmunds
medmundshttps://github.com/medmunds
on Aug 7, 2024https://github.com/sendgrid/sendgrid-python/issues/291#issuecomment-2274479237
Mail Send API Overviewhttps://www.twilio.com/docs/sendgrid/api-reference/mail-send#limitations:~:text=The%20to.name%20%2C%20cc.name%20%2C%20and%20bcc.name%20personalizations%20cannot%20include%20either%20the%20%3B%20or%20%2C%20characters.
Sign up for freehttps://github.com/signup?return_to=https://github.com/sendgrid/sendgrid-python/issues/291
Sign in to commenthttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/291
difficulty: unknown or n/afix is unknown in difficultyhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22difficulty%3A%20unknown%20or%20n%2Fa%22
status: help wantedrequesting help from the communityhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22status%3A%20help%20wanted%22
type: non-library issueAPI issue not solvable via the SDKhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20non-library%20issue%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.