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 7506423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:15:19+00:00 2026-05-29T22:15:19+00:00

Possible Duplicate: Use Zend Framework components without the actual framework? I just need the

  • 0

Possible Duplicate:
Use Zend Framework components without the actual framework?

I just need the Zend_Mail functions of the Zend Framework, but the whole framework is about 300MB in size. Is there a way to cut it down to just the basics and Zend_Mail to save up some disk space?

  • 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-29T22:15:20+00:00Added an answer on May 29, 2026 at 10:15 pm

    Yes, I have used Zend_Mail with SMTP standalone before, here are the files I needed. I also reduced it down to what you need if you only want to use sendmail also.

    If you want to use Sendmail, that is the easiest. Your dependencies are:

    • Zend/Exception.php
    • Zend/Mail.php
    • Zend/Mime.php
    • Zend/Mail/Exception.php
    • Zend/Mail/Transport/Abstract.php
    • Zend/Mail/Transport/Exception.php
    • Zend/Mail/Transport/Sendmail.php
    • Zend/Mime/Exception.php
    • Zend/Mime/Message.php
    • Zend/Mime/Part.php

    And with those files, here is an example use:

    <?php
    // optionally
    // set_include_path(get_include_path() . PATH_SEPARATOR . '/path/to/Zend');
    
    require_once 'Zend/Mail.php';
    require_once 'Zend/Mail/Transport/Sendmail.php';
    
    $transport = new Zend_Mail_Transport_Sendmail();
    
    $mail = new Zend_Mail();
    $mail->addTo('user@domain')
         ->setSubject('Mail Test')
         ->setBodyText("Hello,\nThis is a Zend Mail message...\n")
         ->setFrom('sender@domain');
    
    try {
        $mail->send($transport);
        echo "Message sent!<br />\n";
    } catch (Exception $ex) {
        echo "Failed to send mail! " . $ex->getMessage() . "<br />\n";
    }
    

    If you need SMTP, then you have a few more dependencies to include. In addition to the above you need at least:

    • Zend/Loader.php
    • Zend/Registry.php
    • Zend/Validate.php
    • Zend/Mail/Protocol/Abstract.php
    • Zend/Mail/Protocol/Smtp.php
    • Zend/Mail/Transport/Smtp.php
    • Zend/Validate/Abstract.php
    • Zend/Validate/Hostname.php
    • Zend/Validate/Interface.php
    • Zend/Validate/Ip.php
    • Zend/Validate/Hostname/*
    • Zend/Mail/Protocol/Smtp/Auth/*

    Then you can do something like this:

    <?php
    
    require_once 'Zend/Mail.php';
    require_once 'Zend/Mail/Transport/Smtp.php';
    
    $config    = array(//'ssl' => 'tls',
                       'port' => '25', //465',
                       'auth' => 'login',
                       'username' => 'user',
                       'password' => 'password');
    
    $transport = new Zend_Mail_Transport_Smtp('smtp.example.com', $config);
    
    $mail = new Zend_Mail();
    $mail->addTo('user@domain')
         ->setSubject('Mail Test')
         ->setBodyText("Hello,\nThis is a Zend Mail message...\n")
         ->setFrom('sender@domain');
    
    try {
        $mail->send($transport);
        echo "Message sent!<br />\n";
    } catch (Exception $ex) {
        echo "Failed to send mail! " . $ex->getMessage() . "<br />\n";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Why use a framework with PHP? To begin with, I just can
Possible Duplicate: Why should I use templating system in PHP? I was just curious
Possible Duplicate: Why use enum when #define is just as efficient? When programming in
Possible Duplicate: Why use a framework with PHP? Hi, usually all the projects I
I would like to use ON DUPLICATE KEY UPDATE in Zend Framework 1.5, is
Possible Duplicate: Why use getters and setters? Yes, It's a very simple thing but
Possible Duplicate: Why use pointers? I know what the C++ & does. but what
Possible Duplicate: Easy to use/learn PHP framework? Do most of professional programmers recommend using
Possible Duplicate: When should use doctrine ORM and when zend-db-table? In short, what is
Possible Duplicate: Zend Framework: Controller Plugins vs Action Helpers I know what the difference

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.