Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
      • Book your Agile Fundamentals training
      • Book your Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Automation Email contains random spaces

Solved114 views6 hours agoautomation engine e-mail
3
Mieke Dryepondt [SLC] [DevOps Advocate]4.06K 1 day ago 0 Comments

How can I avoid random spaces in my HTML mail body when creating an email via Automation?

I am using: engine.SendEmail(emailOptions)
where emailOptions = new EmailOptions

The Message of the emailOptions is a string holding HML formatted data.
I've already tried adding a span style, but now I got an email where that exact tag got a random space...

Message = "<HTML><BODY><span style=\"white-space: nowrap;\">" +
"My custom mail body with hyperlinks and bullet lists.<br><br>" +
"</span></BODY></HTML>",

Due to these random spaces, my hyperlinks could fail and the mail content could contain HTML data making it less readable.

Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 6 hours ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Pieter Carlu [SLC] [DevOps Advocate]285 Posted 7 hours ago 1 Comment

Hi Mieke,

When you add a mail action to your automation script, the mail content is inserted into a DataMiner HTML template (located in Skyline DataMiner\NotifyMail.html). In this template, the message is inserted into the 'contents' placeholder:

<html>
<head> ... </head>
<body> ...
<tr><td class="title">[title]</td></tr>
...
<tr><td class="contents">[contents]</td></tr>
...
</body>
</html>

The issue is that the mail content itself contains additional <html> and <body> tags, meaning a new <body> tag is opened inside an already existing <body> tag.

This results in invalid HTML. As a consequence, email clients may interpret the HTML inconsistently and automatically close/reopen tags internally. This can lead to unexpected formatting issues such as random spaces, extra empty lines, or inconsistent rendering.

The recommended solution is to only inject HTML fragments into the Message property without enclosing <html>, <head> or <body> tags.

Hope this helps you further!

Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 6 hours ago
Mieke Dryepondt [SLC] [DevOps Advocate] commented 6 hours ago

I'll try this out. thank you for the clear explanation!

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2026 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin