• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1973
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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