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

  • SEARCH
  • Home
  • 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 7501623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:36:03+00:00 2026-05-29T20:36:03+00:00

I want to use php mailer for sending multiple attachment in mail. But the

  • 0

I want to use php mailer for sending multiple attachment in mail.
But the problem is, how to use it. Where to download it, how to install it,. I have searched for 3 days, but have got confused, two or three tutorials that i used, doesn’t work and make me more confused.
I want a single file tag, that uploads multiple attachments , and send them in email.
I have done with the Email sending with one attachment successfully..

Please guide me. And please give those links that really work for the purpose.

  • 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-05-29T20:36:04+00:00Added an answer on May 29, 2026 at 8:36 pm

    PHPMailer can be downloaded from its SourceForge page.

    Now to the code, which is mostly taken from the examples provided in the ZIPball:

    <?php
    require_once 'class.phpmailer.php';
    
    $mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch
    
    try {
      $mail->AddReplyTo('name@yourdomain.com', 'First Last');
      $mail->AddAddress('whoto@otherdomain.com', 'John Doe');
      $mail->SetFrom('name@yourdomain.com', 'First Last');
      $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
      $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
      $mail->MsgHTML(file_get_contents('contents.html'));
      $mail->AddAttachment('images/phpmailer.gif');      // attachment
      $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
      $mail->Send();
      echo "Message Sent OK</p>\n";
    } catch (phpmailerException $e) {
      echo $e->errorMessage(); //Pretty error messages from PHPMailer
    } catch (Exception $e) {
      echo $e->getMessage(); //Boring error messages from anything else!
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use PHP writing git hooks but have some problem. I use
I'd love to use PHP variables in my CSS files but I don't want
Hi have some forms that I want to use some basic php validation (regular
The problem: I want to use PHP include to import file header_menu.html into all
I have a string like this: <span style=font-weight: bold;>Foo</span> I want to use PHP
Hi I want to create a mailer with php that will use a qeue
I want to use php str_replace on an array of some words, but I
I want to use php to easily maintain my website, but I simply can't
I want to use php in console mode and create an environment to test
I want to use PHP to replace javascript functions in HTML documents. For example:

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.