attach file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ken

    attach file

    I have a large text file that is send with mail.

    I would like to save the text as a file (*.txt) and then attach it to the
    email.

    Can I do that with PHP?

    How do I save the text $body as a file?

    How do I attach (send) it to mail()?

    Thanks for the help!

    Ken


  • Michael Austin

    #2
    Re: attach file

    Ken wrote:
    I have a large text file that is send with mail.
    >
    I would like to save the text as a file (*.txt) and then attach it to the
    email.
    >
    Can I do that with PHP?
    >
    How do I save the text $body as a file?
    >
    How do I attach (send) it to mail()?
    >
    Thanks for the help!
    >
    Ken
    >
    >

    look at phpmailer - I believe it has this functionality - though I have
    not used it...

    Comment

    • Ken

      #3
      Re: attach file

      Michael,
      I set up PHPMailer. Great program.
      I was able to send an attachment with PHPMailer.

      Thanks for the suggestion.

      Now the question is:
      In PHP, how do I convert a php $body= " " which includes text + variables
      into a .txt or .html file so the saved file has the value of the variables
      rather than the $variable?

      Ken



      "Michael Austin" <maustin@firstd basource.comwro te in message
      news:ZASOj.3331 $h75.1893@newss vr27.news.prodi gy.net...
      Ken wrote:
      >I have a large text file that is send with mail.
      >>
      >I would like to save the text as a file (*.txt) and then attach it to the
      >email.
      >>
      >Can I do that with PHP?
      >>
      >How do I save the text $body as a file?
      >>
      >How do I attach (send) it to mail()?
      >>
      >Thanks for the help!
      >>
      >Ken
      >
      >
      look at phpmailer - I believe it has this functionality - though I have
      not used it...

      Comment

      Working...