-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFR] Mail component #72
Comments
This requirement is scheduled for 0.6.0 |
Mail component can be inspired by CakeEmail component. Easy to use and understand, not complicated (like Symfony one) See: http://book.cakephp.org/2.0/en/core-utility-libraries/email.html |
On c it will work much more faster, also if it will be native framework solution, it will be much easier. |
In my opinion Mail component currently not required for phalcon. There is a lot of library component for this job. One of this library is \Zend\Mail The library very useful with DI. <?php
$di = new \Phalcon\DI\FactoryDefault();
$di->set('mail', function() {
return new \Zend\Mail\Transport\Sendmail();
}, true);
$mail = new \Zend\Mail\Message();
$mail->setBody('This is the text of the email.');
$mail->setFrom('[email protected]', 'Sender\'s name');
$mail->addTo('[email protected]', 'Name o. recipient');
$mail->setSubject('TestSubject');
$di->get('mail')->send($mail); |
Perhaps you could look at the Ruby on Rails implementation on sending emails. E-mails are a lot like controllers, handling data and views and linking the two. I would love to see this implemented in Phalcon: |
@tugrul Zend is VERY heavy library, it's not good practice to import all Zend into project just because of it's mail component (otherwise you will have big workaroung filtering out required files). Anyway, zend implementation is very nice, except some little bugs. |
Yup, till nowdays, there is no standalone php mail library following PSR standards.. We're waiting for this component very much :) |
@avasin you are partially right. You don't need import every component of Zend to use Mail component. Zend Framework 2 seperated modules for each different tasks. I hate the Application model of Zend Framework 1 and 2 but Mail component is good part of Zend Framework 2. |
For me PHPMailer is good enough. |
👍 |
Well, for me the best library to sending emails is http://swiftmailer.org . Stable, good documentation, simple to use. |
PHPMailer is not psr-compatible. Don't remember if swiftmailer is. |
👍 |
As for me, mail component is not needed inside of the core. |
+1 Nowadays, you have swiftmailer which is great but too heavy. This addition could make phalconphp the best framework for applications demanding huge usage of mailing. |
+1 |
-1
It's better to focus on other issues |
After further discussion, we decided not to pursue this issue for the time being. The reason behind this is that a mail component has very little to gain from Phalcon. Once you have your content, you just set it up in the object and from then on it is all network traffic i.e. connect to the other server, transfer the email and close the connection. Applications mentioned here as swiftmailer, phpmailer or any other can easily be included in our applications for the purpose of sending emails. Perhaps in the future we might tackle this again but for the time being we will concentrate our efforts on other issues. |
I would like to see a Mail component in the framework.
The component encapsulate sending mail over Sendmail (linux) or SMTP with local/remote connections.
from
to
message
headers
cc
bcc
attachments
should be considered as core.
The text was updated successfully, but these errors were encountered: