1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP CLASS:send email with files Attachment easy

Discussion in 'PHP' started by astkboy2008, Jan 21, 2010.

  1. #1
    hello
    You’ll still use mail() function, but with a little more twists in the header argument – yes, the content of the attached file is actually encoded into the header of the email, can you believe that. Big head.
    this class AttachmentEmail that you can email an attachment with PHP more easily. All the chores are taken care of. It’s written in a hurry so the structure can sure be better. Other than this, it works like a chaarm.
    example:
    example.php [170 B]
    <?php
    require ('Email-Attachment.php');
    
    $sendit = new AttachmentEmail('marry@example.com', 'Merry Christmas!', 'Hi',
    '/home/racker/gift.jpg');
    $sendit -> mail();
    ?>
    PHP:
    view the class:Email-Attachment.php [2.66 KB]
    class on jooria refresh your website

     
    astkboy2008, Jan 21, 2010 IP
  2. CR1M1N4L

    CR1M1N4L Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, I prefer PHPMailer because it has a lot of great features like attachments support, UTF-8, HTML mails etc
     
    CR1M1N4L, Jan 21, 2010 IP
  3. astkboy2008

    astkboy2008 Peon

    Messages:
    211
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i think PHPMailer is the most advanced one
    thanks
     
    astkboy2008, Jan 22, 2010 IP
  4. dsignresponder

    dsignresponder Greenhorn

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #4
    dsignresponder, Jan 22, 2010 IP
  5. astkboy2008

    astkboy2008 Peon

    Messages:
    211
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    astkboy2008, Jan 23, 2010 IP