0

Ok so I'm fairly new to Linux and I'm still learning as I go. Apologies I use the wrong terms and etc.

So I want my ngrok port curl output to be converted to text and send it as an email with ssmtp.

I did this: echo "$(curl localhost:4040/api/tunnels)" | ssmtp <email address>

I've received the mail but the mail is empty. What could've been the problem here? Thank you!

1 Answers1

0

You need to add text to you message body:"

ssmtp "<the message content>" <email address>
Misunderstood
  • 5,534
  • 1
  • 18
  • 25
  • Hey thanks for replying. So you mean like: `ssmtp "$(curl localhost:4040/api/tunnels)" ` or `ssmtp "echo "$(curl localhost:4040/api/tunnels)"" ` ?? – AppleBox Nov 21 '22 at 09:00
  • 1
    Nevermind, I tried a couple of things and adding `2>&1` at the end of curl did the trick! :) – AppleBox Nov 21 '22 at 09:52