Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    33
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Email Attachment

    Hello, dear friends.

    I am trying to have my form use an upload button to attach a file to the e-mail that is processed and sent through PHP, and I'm having trouble figuring out how to accomplish this.

    I currently have the "upload" portion in the form, I just need to know how to attach that to the process.php file.

    I've exhausted google on this--to be frank, I just don't get it. Plus, the php file already has other things in it, so I'm not always sure where to put what websites say to put. I can show the php upon request.

    Any help would be appreciated.

    - Kyle

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    1)Make use of PHPMailer class.
    2)Add enctype="multipart/form-data" attribute to your form
    3) Use <input type="file" ..........
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Feb 2008
    Posts
    33
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Step 2 and 3 are done.

    As for step 1, I find that website to be generally non-responsive in that it frequently and consistently freezes.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New Coder
    Join Date
    Feb 2008
    Posts
    33
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you, I have downloaded PHPmailer.

    But I am having a little trouble installing it. The README file says,

    Copy class.phpmailer.php into your php.ini include_path. If you are
    using the SMTP mailer then place class.smtp.php in your path as well.
    But I find no such path in my root folder.
    Last edited by KyleT4L; 08-15-2008 at 07:52 PM.

  • #6
    New Coder
    Join Date
    Jul 2008
    Posts
    91
    Thanks
    4
    Thanked 9 Times in 9 Posts
    you need to open the php.ini (the configuration file of PHP) and find where the default include location is. Otherwise you will need to know how to edit the other script and add the include yourself.
    Current Project: Nothing at the minute


  •  

    Posting Permissions

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