web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an email in plain...
Power Automate
Unanswered

Send an email in plain text

(0) ShareShare
ReportReport
Posted on by 131

I've been struggling for a couple of weeks and was hoping someone might have a solution. I need to send an email in plain text only, with no HTML. The legacy system I'm working with parses data solely in plain text, and any formatting throws it off.

My current flow grabs an email, performs several actions, and then uses a compose action (payload) to format the email. The compose action correctly formats each item on a new line (Using \n), but when the email is sent, it arrives as one long paragraph. This causes the legacy system to mess up the parsing. However when reviewing the flow run itself it looks exactly how I need it. I've tried deleting the <p></p> from the html view of send an email action. I've also tried using <pre></pre> and while the line breaks are there the html email itself ruins the parsing.

Has anyone faced a similar issue or have any ideas on how to ensure the email retains its plain text formatting when sent? Any help would be greatly appreciated!


These are the instructions regarding formatting for the system

Formatting

  • Plain Text Emails Only: Web Interface parses key/value pairs from plain text emails. HTML or RTF emails will cause errors.

  • Subject Line Handling:

    • Successfully processed emails with the specified subject line will be deleted from the server.

    • Emails causing an error will be forwarded to the error email address in Mercury Administration. If forwarding fails, the email will stay on the server.

  • Error Handling: Emails without the specified subject line will be forwarded to the error email address in Administration.

  • Email Content:

    • All content should be in the body of the email, whether encrypted or not.

    • Encrypted content must be Base64 encoded with the correct line block length.

    • Attachments will be ignored.

  • Special Characters: Avoid special characters in the email except in the email address (e.g., no #, $, %, ^, &).

  • Product Fields:

    • If not using the Product Description field for a description, enter the product code in both the Product Description and Product Code fields.

  • Web Order Form Fields: Include all fields in the generated email, even if they are unused.

  • Sample should look like this:

Name: Joe Customer
Address1: 12345 Main Street
Address2:
City: Anytown
State: IL
Country: USA
Zip Code: 60515
Phone Area Code: 630
Phone Prefix: 555
Phone Number: 7890
Phone Extension: 1028
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    Try sending the e-mail through a Graph API request:
     
    POST https://graph.microsoft.com/v1.0/me/sendMail

    Body of request:

    {
      "message": {
        "subject": "Your Subject Here",
        "body": {
          "contentType": "text",
          "content": "This is the plain text content of the email."
        },
        "toRecipients": [
          {
            "emailAddress": {
              "address": "recipient@example.com"
            }
          }
        ]
      },
      "saveToSentItems": "true"
    }
     
    You can test it in the Graph API explorer at Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph. It is under Outlook Mail > Send an email.
     
  • Kamz Profile Picture
    131 on at
    Thanks David, that didn't work. I got the email to send using the graph but the data comes in as this:

    CUSTOMER NAME: John Doe=0A=
    E-MAIL ADDRESS: johndoe@example.com =0A=
    AD: 123 Main Street Apt 4=0A=
    =0A=
    AD: Springfield=0A=, MA =0A=
    DAYTIME TEL. #: (555)=0A-1234567=0A= EXT. =0A=
    NIGHT TEL. #:
    FAX #: (=0A)=0A-=0A=
    Recipient Name: Jane Doe=0A=

    Recipient Address: 123 Main street=0A=

    =0A=

     
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    You will need to show the configuration of your workflow. I ran the API call with the data you show and it worked:
     
     
    This was the body I used for the call:
     
    {
      "message": {
        "subject": "Plain Text Email",
        "body": {
          "contentType": "text",
          "content": "Name: Joe Customer\nAddress1: 12345 Main Street\nAddress2:\nCity: Anytown\nState: IL\nCountry: USA\nZip Code: 60515\nPhone Area Code: 630\nPhone Prefix: 555\nPhone Number: 7890\nPhone Extension: 1028."
        },
        "toRecipients": [
          {
            "emailAddress": {
              "address": "email@domain.com"
            }
          }
        ]
      },
      "saveToSentItems": "true"
    }
     
  • Kamz Profile Picture
    131 on at
    Yes I get the same result as you when I test to a Gmail, however it doesn't appear to be true plaintext. If you look at the email headers it looks like quoted-printable encoding. Looks like this is why when it comes into my system it replaces the \n with =0A= 

    Thoughts?
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    I think you will need to contact the company that developed the system where the e-mails are being sent as I have no knowledge of it. Good luck!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard