# PDF Make Node, Issues creating an E-mail with text

**URL:** https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325
**Category:** General
**Created:** [2 January 2025 19:51 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325 "2025-01-02T19:51:15Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [2 January 2025 19:51 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/1 "2025-01-02T19:51:15Z")

</div>

Hey everyone,

I'm Michael from Germany, and I'm pretty new to Node-RED. I recently built a machine for vacuum testing and now want to create a protocol for the testing process.

The protocol should include information like:

- Which functions were activated during the test,
- Who performed the test,
- Which part was tested, and so on.

The idea is to send this protocol via email to a specific address. Ideally, the flow would generate a PDF document with all the collected values and the company’s logo.

Right now, I’m having an issue with sending the email, and I think it might be because of the format of the values. I’m also not sure how to properly use the `pdfmake` node.

I’ve attached my flow and would really appreciate it if someone could help me out or share some tips on how to make this work. Thanks a lot in advance!

Cheers,  
Michael

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [2 January 2025 21:56 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/2 "2025-01-02T21:56:48Z")

</div>

I don't think I've ever actually bothered to send an email from Node-RED myself so not totally sure I can help with that - though I'm sure we could work it out.

However, a question. Why a PDF? Those are a pain to work with and generally are not accessible which might be an issue for you given EU laws in that area.

Instead, why not simply make use of HTML in the email?

For your logo, I recommend running through an online tool to fully optimise it and then run it through a tool to turn it into a data url. That will let you embed it into an HTML email and have the email client's more reliably display it.

All modern email clients will accept HTML emails and will deal with basic formatting. Just avoid JavaScript, external fonts and overly complex CSS.

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [2 January 2025 23:46 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/3 "2025-01-02T23:46:15Z")

</div>

![Screenshot 2025-01-02 203012](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c38f6ffc7f687f6fc02c719e39adce793c01c052.png)

Sorry - i forgot the attachment

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [2 January 2025 23:53 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/4 "2025-01-02T23:53:46Z")

</div>

@TotallyInformation : Hey, thanks for the tip! Yes, implementing it with HTML could also be an option. As I mentioned, I’m new to this topic and don’t know much yet. At the moment, it’s not working at all, and I’m getting an error message.

I believe my email setup is configured correctly. I’m using ioBroker, and in the email settings, there’s an option to send a test email. That works fine. I think the issue is with the setup in Node-RED. That’s probably where things aren’t working as they should.

 ![Screenshot 2025-01-03 004754](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/58aaff20684ab3dc1b91a26aef05c2214acef337.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [3 January 2025 00:36 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/5 "2025-01-03T00:36:24Z")

</div>

So it doesn't think that your mailbox address is correct. Is it entered correctly?

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [3 January 2025 15:49 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/6 "2025-01-03T15:49:17Z")

</div>

yes i think so :

 ![Screenshot 2025-01-03 164604](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1ce1ea9b2e5ad13a8c1811a86b38242b0707a05b.png)  
this are my settings in ioBroker. and here in NodeRed:  
 ![Screenshot 2025-01-03 164517](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/a/ea569bfb5eeb9f51ef24c1d8befba87632d73921.png)  
this message is in the debug node :  
 ![Screenshot 2025-01-03 164447](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5e0e36724cb9bbbf35629ab74fed1af93a327652.png)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [3 January 2025 16:49 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/7 "2025-01-03T16:49:45Z")

</div>

Check you have the right port number.

According to [https://hilfe.web.de/pop-imap/imap/imap-serverdaten.html](https://hilfe.web.de/pop-imap/imap/imap-serverdaten.html) the SMTP port is 587

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [3 January 2025 17:29 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/8 "2025-01-03T17:29:10Z")

</div>

Darn it, you beat me to it! 😄

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [3 January 2025 18:04 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/9 "2025-01-03T18:04:59Z")

</div>

The error persists even after changing the port

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cbff7d25c3f8a085c263fae6c76acfaaf169b1a2.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/b/7b23a9ff87c5cfcf6842d715d8a30179c00d9c9d.png)  
but [web.de](http://web.de) says that port 465 is also ok  
 ![Screenshot 2025-01-03 185900](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/1/4175f74fff9f3678ad3220c72df153c5216f31a0.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [3 January 2025 18:19 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/10 "2025-01-03T18:19:58Z")

</div>

In that case, the auth type is also probably wrong. I'm afraid I can't remember what the options are.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [3 January 2025 19:18 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/11 "2025-01-03T19:18:29Z")

</div>

I suspect you need someone with a [web.de](http://web.de) email account to share experience their 😧

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [3 January 2025 19:30 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/12 "2025-01-03T19:30:57Z")

</div>

which email client would you recommend for general use? i´m open to suggestions like Gmail or others...

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [3 January 2025 19:42 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/13 "2025-01-03T19:42:41Z")

</div>

I do use gmail, there's a howto ~~somewhere on the forum.~~ here:  
[https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/5](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/5)  
Also see  
[https://flowfuse.com/node-red/notification/email/](https://flowfuse.com/node-red/notification/email/)

I have not tested with attachments though.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [3 January 2025 19:50 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/14 "2025-01-03T19:50:09Z")

</div>

> [@wuddy](#):
>
> Gmail or others

GMail, Outlook, etc all use Modern Authentication methods which generally means that you need to create an application code for logging in from a system.

For those, you may have to use the OAuth2 option but you will need a suitable token from the service.

* * *

For what I can see, [web.de](http://web.de) requires the part BEFORE the @ symbol as your user id and it should accept the basic login.

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [4 January 2025 08:46 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/15 "2025-01-04T08:46:00Z")

</div>

Okay, I’ll try this with Gmail tonight. @jbudd, thanks for the link!

I’m wondering if the issue is related to the email node itself, or if I made a mistake earlier in the flow. I’ve collected multiple values and combined them using a `join` node.

Do I need a `function` node as well to format the data, or can I connect the output of the `join` node directly to the email node?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [4 January 2025 12:28 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/16 "2025-01-04T12:28:08Z")

</div>

Did you try using just the name before the @ symbol as the id?

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [4 January 2025 13:15 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/17 "2025-01-04T13:15:00Z")

</div>

> [@TotallyInformation](#):
>
> For what I can see, [web.de](http://web.de) requires the part BEFORE the @ symbol as your user id and it should accept the basic login.

yes i tried this with 465 and with 587.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/a/7ab1706547451c4d6f71e44e0d635c4bceabaa00.png)  
and i changed the name to vacucheck (without the @symbol an [web.de](http://web.de))  
but it doesn´t work. the Test function in iobroker works with nr 465)  
but here in Node red : It still doesn't work

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [4 January 2025 13:27 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/18 "2025-01-04T13:27:41Z")

</div>

OK, seems like others have had issues with that service as well. Gmail it is then by the looks of it!

---

<div class="post-metadata">

### Author: ![wuddy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wuddy/32/97690_2.png) [@wuddy](https://discourse.nodered.org/u/wuddy)
#### Post date: [4 January 2025 20:19 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/19 "2025-01-04T20:19:47Z")

</div>

Hey, I’m very happy to say that it’s now working with Gmail. I’m really, really happy—thank you so much for your help!

I want to create a test protocol that collects all the data in my flow. I already have a script in my function node, but unfortunately, it’s not working. It was created with ChatGPT. Maybe someone can check it to see what the problem is?  
Thats the code :

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3e19dd81a7bc7be580fd37d18a8bde4d8c483b70.png)  
Thats the flow:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/8/a89f5dcc18baf8aefab8b8bdcaf0c572d51db5cf.png)  
and that ist the output in the Mail:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/1938ed8f5cb63fdef2f0447e621c8d7d56532e3d.png)  
the nodes with the description "Statusauswertung" translates the values to an readable format. Example:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52b707199d396e3547208903fe84171215e0bf2a.png)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [4 April 2025 20:20 UTC](https://discourse.nodered.org/t/pdf-make-node-issues-creating-an-e-mail-with-text/94325/20 "2025-04-04T20:20:42Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
