Urgent.News

What's breaking now, across thousands of outlets.

Tech

The text/plain part is not optional

Plenty of sending pipelines generate HTML only, let the library add an empty text part, and move on. It works until a recipient client renders the empty part, or a filter scores the message as suspicious for having no readable alternative. What the text part is for It is the fallback for clients that do not render HTML, the accessible version for screen readers, and a signal that the message was…

Many email sending systems only create HTML content, relying on libraries to generate an empty text version and then continue. This method is effective until a recipient's client displays the empty text part or a filtering system flags the message as suspicious due to the lack of a readable alternative. The purpose of the text part is two-fold: it serves as a fallback for clients that do not render HTML, provides an accessible version for screen readers, and signals that the message was carefully composed rather than bulk-sent.

A properly formatted multipart/alternative email with both text and HTML parts appears as a message a human would send. To achieve this, avoid stripping tags from the HTML during send time – URL links disappear, and the result becomes unreadable. Instead, compose the text version in tandem with the HTML: maintain identical paragraphs, transform links into "label https://url", and represent lists using dashes. Utilize a template, not a converter, to streamline the process.

One common pitfall is the line-length trap. Text bodies should wrap at 78 characters. A single 400-character paragraph in the text part appears as an unwieldy single line in some clients and can even be misinterpreted by filters that consider long lines as machine-generated. Wrap the text at composition time to prevent this issue.

Lastly, ensure that no template placeholders remain in the text part after rendering. For instance, a stray "{{first_name}}" can render the message as broken, rendering the fallback ineffective. Verify in the test suite that no braces survive rendering, not in production.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I Built a Boston Common Shadow Study From a Single Map Selection

The setup Last month I wanted a shadow study of Boston Common without downloading LiDAR, learning a full GIS stack, or asking anyone for a license.

  • Defined question focused on Boston Common's southwest lawn shade at 3 pm in December
  • Chose rectangular bounding box encompassing Common plus two blocks in every direction
  • Used stationary elevated camera for consistent comparisons at 9 am, noon, and 3 pm

Attachments you should refuse before they reach the parser

Accepting any attachment is a decision to run a parser on bytes a stranger chose. The cheap defences are at the boundary: extension and content-type allowlists, size caps, and a hard limit on the…

  • Refuse attachments from unknown sources to prevent security risks.
  • Trust decoded bytes, not header claims, for accurate file type verification.
  • Enforce caps on decompressed size and file count for archives to avoid disk filling.

How to Write a Cover Letter That Gets Read (2026)

Nobody reads generic cover letters. Here is the 3-paragraph formula, with real examples, that makes hiring managers keep reading.

  • Introduce yourself, state the position, and express excitement about the company and role
  • Provide concrete examples of achievements using the Problem-Action-Result framework
  • Reiterate fit for the position, invite further discussion, and avoid generic language

Taiga title matches need project ownership context

Taiga title matches need project ownership context Taiga is a project and issue management application. A public instance may contain backlogs, user stories, sprint plans, repository links, and…

  • Taiga app discovered 6,946 potential matches for title on 2026-11-03
  • Project data requires understanding context including ownership, URLs, and membership
  • ZoomEye can seed Taiga inventory, but organization must classify public/private projects

More from Tuesday 3 November →