Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2005-01-18T07:18:58Z by SystemAdmin
SystemAdmin
SystemAdmin
232 Posts
ACCEPTED ANSWER

Pinned topic Mailing HTML output files

‏2003-12-12T01:22:00Z |
Hello all,

Environment: AIX 5.2

I have a perl script that generates and output file in HTML format. When I try to mail the output file using the mail command, the e-mail is received as text with the HTML codes in it. I've established the content type as text/html and if I paste the html code in a html editor it works. So now I believe it must be an issue with the mail command.

mail -s "subject" user < file

Any clues?

Also, does anyone know of an AIX forum I can post to?

Thanks,

Scott
Updated on 2005-01-18T07:18:58Z at 2005-01-18T07:18:58Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    232 Posts
    ACCEPTED ANSWER

    Re: Mailing HTML output files

    ‏2004-01-03T18:56:05Z  in response to SystemAdmin
    > Hello all,
    >
    > Environment: AIX 5.2
    >
    > I have a perl script that generates and output file
    > in HTML format. When I try to mail the output file
    > using the mail command, the e-mail is received as
    > text with the HTML codes in it. I've established the
    > content type as text/html and if I paste the html
    > code in a html editor it works. So now I believe it
    > must be an issue with the mail command.
    >
    > mail -s "subject" user < file
    >
    > Any clues?
    >
    > Also, does anyone know of an AIX forum I can post
    > to?
    ...

    My apologies to you, shammons1, for the delay in replying. The holidays are ... disruptive.

    My favorite AIX forum is news:comp.unix.aix. Do you know how to access Usenet?

    I entirely understand your question about mail. Briefly, /usr/bin/mail doesn't know MIME, including the notion of "content type".

    There are lots of libraries and tools that do know MIME. Without knowing more about your situation, my guess is that you'll do best to install mutt http://www.mutt.org/ and then write simply
    codemutt -a file.html -s "This is the subject" $recipient < /dev/null[/code].
  • SystemAdmin
    SystemAdmin
    232 Posts
    ACCEPTED ANSWER

    Re: Mailing HTML output files

    ‏2004-07-23T21:56:29Z  in response to SystemAdmin

    > mail -s "subject" user < file

    ueencode file file | mail -s "subject" user

    this would send the html file as an attachment which you could double click to open?
    -b-
  • SystemAdmin
    SystemAdmin
    232 Posts
    ACCEPTED ANSWER

    Re: Mailing HTML output files

    ‏2005-01-18T07:18:58Z  in response to SystemAdmin
    What's your e-mail client? Check properly with e-mail client. Mostly it may not be problem with mail command.