AppleBox
AppleBox

Reputation: 1

How do I send the output of my Curl command to email with ssmtp?

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!

Upvotes: 0

Views: 234

Answers (1)

Misunderstood
Misunderstood

Reputation: 5665

You need to add text to you message body:"

ssmtp "<the message content>" <email address>

Upvotes: 0

Related Questions