Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I want to send the html file contents via mail in html format from linux command prompt. For example i have file called report.html. i want to get the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11

    Post sending html file details to mail id in html format from Linux command


    Hi,

    I want to send the html file contents via mail in html format from linux command prompt.

    For example i have file called report.html. i want to get the report.html details in html format to my mail box via linux command. Please help me on this.

    Thanks in advance.

    Regards,
    Sachikanta

  2. #2
    Just Joined!
    Join Date
    Jul 2007
    Location
    Chennai, India
    Posts
    9

    sendmail

    Isn't it
    Code:
    cat report.html | sendmail (or it's wrapper script) emailaddress
    At the receiving end, you should be able to open your browser and give the file name and path to open the file.

    OK

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    9
    i would do it like this:

    Code:
    echo "some text" | mailx -s "some subject" -a report.html <mailaddress>
    This will place the report.html file in an attachment, if you don't want in in an attachment you can do it this way:

    Code:
    cat report.html | mailx -s "some subject" <mailaddress>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •