Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8443995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:17:22+00:00 2026-06-10T09:17:22+00:00

So I Have a form that will send out emails that correspond to how

  • 0

So I Have a form that will send out emails that correspond to how they filled the form. I have to take some information that was filled in the form and put it in a HTML form to send in a email which is done in php.

My question is, is there anyway to turn that form into a attachable file that could just be added to the mail function and sent instead?

Thank you for your time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:17:24+00:00Added an answer on June 10, 2026 at 9:17 am

    Yes, you can transform your HTML form into a… HTML page (using HTML tokens manually, or maybe something like TCPDF?), and save it to a temporary disk file, then attach it to the outgoing email. Of course, your mail function must support attachments! (If it doesn’t, use a different mailer functions – there’s many of them).

    You can do it quickly by preparing the form manually and replacing the text fields with something like {{ Name }}.

    Then just run a str_replace on the file_get_contents() of your template and save the results in a temporary file:

     $translate = array(
         '{{ Name }}'    => $Form['Name'],
         ....
     );
     // one could also use preg_replace with 'e' flag and use directly $Form...
     $html = str_replace(array_keys($translate), array_values($translate),
                file_get_contents("form-template.html"));
    

    In just the same way you can prepare a Word document, save it as RTF (which is ASCII readable), and attach the file with .doc extension — most word processors will open it automatically.

    If you want to send a PDF file (using TCPDF, FPDF, etc.), it’s a bit more complicated but not too much.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a form on MS Access 2003 that will send out a html
Alright, so I have some jQuery code that will send an AJAX request to
I have a form that the users for my website will fill out. Once
The functionality I'm looking for: I have a form that will search my 'Proposal'
I have a windows form that has two DataGridViews (DGVs) that will hold 25,000+
(Using MySQL and PHP) I have a search form that will allow my users
I have a form in my application that will fill using Unicode characters (Non
I have created a form with knockout that will allow the ability to give
I have a form with a hidden Came from Adwords field that will be
I currently have a simple form that when you click the save button will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.