SEO Software
+ Reply to Thread
Results 1 to 6 of 6

Thread: Looking for multiple email attachment script in php

  1. #1

    Default Looking for multiple email attachment script in php

    hello,
    im looking for a script in php which sends multiple email attachments. i need it for my website which responds to contacts through email with 3-4 attachments. hope you could give one. thanks.


  2. SEO Software

  3. #2

    Lightbulb

    hi maoste.....
    the problem of your solution is here.......
    i have search for you some sites that are very useful to you...
    check them out...
    site1
    site2
    site3
    so use them and if you really feel that they are helpful then click to thanks button......
    And WELCOME in advance....
    .......USE THE LINKS.......

  4. #3
    Fulltime Member viraj_zaveri is on a distinguished road viraj_zaveri's Avatar
    Join Date
    Apr 2009
    Location
    GUJARAT,INDIA
    Posts
    744
    Thanks
    192
    Thanked 44 Times in 42 Posts

    Default

    site-3 is not working donald.It's shows the page does not exist.Please check this.
    The site-1 is good one though.

  5. #4

    Lightbulb

    Quote Originally Posted by viraj_zaveri View Post
    site-3 is not working donald.It's shows the page does not exist.Please check this.
    The site-1 is good one though.
    oh thanks viraj.........
    there is my mistake to send that link....
    the link is this

  6. #5

    Default

    Code:
    <?php
    function mail_attachment($filename, $path, $mailto, $from_mail, $from_name, $replyto, $subject, $message) {
        $file = $path.$filename;
        $file_size = filesize($file);
        $handle = fopen($file, "r");
        $content = fread($handle, $file_size);
        fclose($handle);
        $content = chunk_split(base64_encode($content));
        $uid = md5(uniqid(time()));
        $name = basename($file);
        $header = "From: ".$from_name." <".$from_mail.">\r\n";
        $header .= "Reply-To: ".$replyto."\r\n";
        $header .= "MIME-Version: 1.0\r\n";
        $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n";
        $header .= "This is a multi-part message in MIME format.\r\n";
        $header .= "--".$uid."\r\n";
        $header .= "Content-type:text/plain; charset=iso-8859-1\r\n";
        $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
        $header .= $message."\r\n\r\n";
        $header .= "--".$uid."\r\n";
        $header .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; // use different content types here
        $header .= "Content-Transfer-Encoding: base64\r\n";
        $header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n";
        $header .= $content."\r\n\r\n";
        $header .= "--".$uid."--";
        if (mail($mailto, $subject, "", $header)) {
            echo "mail send ... OK"; // or use booleans here
        } else {
            echo "mail send ... ERROR!";
        }
    }
    ?>
    Try this script.

    Used Motorcycles for sale - Honda ATVs for sale

  7. #6
    Registered User immediate is on a distinguished road immediate's Avatar
    Join Date
    Nov 2009
    Location
    kavoir.com
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try this email attachment class: PHP: Email Attachment Class
    So you want to start a website and get prevalent? How about purchasing some website content database.

+ Reply to Thread

Similar Threads

  1. Email with at attachment
    By nikon in forum PHP Help
    Replies: 3
    Last Post: 06-22-2009, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

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