[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1966
  • Last Modified:

Sending HTML email from bash

Has anyone been able to send HTML email from bash? I know that I could do it with PHP, but I'm trying to make the script without using any outside sources. If I have to, it's understandable.

Currently, I'm using mutt to send the file since I have attachments as well.

cat somefile.htm |mutt -s "subject" -a file.txt email@company.com
0
SpasticChicken
Asked:
SpasticChicken
  • 2
1 Solution
 
wesly_chenCommented:
Which mail client you use in bash script?
0
 
SpasticChickenAuthor Commented:
I use mutt, but I figured out what I needed to do:

mutt -e "my_hdr Content-Type: text/html" -s "my subject" email@company.com < message.html
0
 
wesly_chenCommented:
Glad to hear your issue resolved and post your solution here.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now