Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Sending HTML E-mail Results via Form?

Since no one could answer my other question;

http://answers.yahoo.com/question/index;_ylt=AlpLK...

Maybe this will be less difficult to help with,

Using Matt's FormMail;

Is it possible to send results in HTML?

For example I want the result e-mail to contain the form data and an image logo on top of the results; perhaps other modifications but this is it for now. Can it be done?

I think I tried every code in the world; along with re-searching passing HTML data via forms and still found nothing.

Does anyone know how to do this?

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Well, to achieve that, FormMail code will need heavy modifications. You'll have to rewrite send_mail() function to produce HTML instead of plain text.

    Something like this:

    sub send_mail {

    ....

    print MAIL "To: $Config{'recipient'}\n";

    print MAIL "From: $Config{'email'} ($Config{'realname'})\n";

    # add this:

    print MAIL "Content-Type: text/html\n";

    ....

    # add this:

    print MAIL <<__EOH__;

    <html><head><style>

    .... your style sheet here

    </style></head>

    <body>

    <p><img src="http://your-company.com/logo.jpg%22%3E%3C/p%3E

    .....

    __EOH__

    print MAIL "<p>Below is the result of your feedback form. It was submitted by\n";

    ....

    You get the idea.

    Good luck.

  • 5 years ago

    This typically requires some sort of server-side scripting, such as PHP, ASP, etc. There are free services that will host a script for you though.

Still have questions? Get your answers by asking now.