Git Product home page Git Product logo

Comments (7)

liuch avatar liuch commented on May 28, 2024

Hi justdave,

I agree with you that it is necessary to expand number of ways to send the emails. But I don't want to use Composer for this, sorry. This is an explicit dependence, I try to avoid this in my project, especially since there is a ready-made package called libphp-phpmailer, at least for Debian. Moreover, I do not use Composer at all and it will be difficult for me to support this dependence.

I think it will be enough to expand $mailer option in the configuration file: add parameters method, username, password, and maybe encryption to it. Keep in mind that credentials for SMTP may differ from the IMAP ones. Of course, it makes sense to add a comment to the sample configuration file and add some checks in the script. By default I would use the old method of sending emails.

I already thought of sending reports via phpmailer as an option, but it will take time for me, because I'm not familiar with this library. If you do this work without Composer, I will gladly accept your PR.

Any way, thank you for your attention to my project!

from dmarc-srg.

justdave avatar justdave commented on May 28, 2024

I've never used a system-wide PHPMailer before, and had to do a little research to figure out how to do it... and discovered that PHPMailer officially no longer supports being used system-wide as of version 6.0, and using composer (or embedding the entire package in your project manually) is their only supported installation method.

However, poking around at the Ubuntu packages, it looks like the Debian folks ported the system-wide autoload feature from version 5 back into version 6, so you can still do that on Debian and Ubuntu systems, even though PHPMailer upstream doesn't actually support it.

My shared hosting provider is running Debian. But they don't have libphp-phpmailer installed, so using composer will be my only (easy) way to get it. I can get it on my Ubuntu laptop to play with it though. So I guess the answer here is to have the path to the autoload file for phpmailer in the config file, and have the default for the Debian/Ubuntu package and the default for composer both there and commented out. And that'll let the user install it wherever they want and be able to tell it where it lives, with usable examples if they're in either common scenario.

from dmarc-srg.

liuch avatar liuch commented on May 28, 2024

I thought It might be better to just allow to specify a command to be run when the email is sent and pass it the target email address and message text. This would allow to configure any program to send messages as an alternative to the built-in function. How do you think?

from dmarc-srg.

justdave avatar justdave commented on May 28, 2024

It'll probably work on mine, but some hosting providers have exec and friends disabled in PHP.

from dmarc-srg.

liuch avatar liuch commented on May 28, 2024

Yes, you're right, I didn't think about that. Any way, I'm going to add the ability to output the text of the summary dmarc report to stdout. So you may run your own script in cron, get a summary report in it, and then send the report wherever you want.

from dmarc-srg.

mbsouth avatar mbsouth commented on May 28, 2024

The possibility to send reports directly via SMTP would also be very advantageous for me!
A simple SMTP PHP class (single file) can be found here: https://github.com/halojoy/PHP-SMTP-Mailer. MIT licensed, none dependencies!
The necessary credentials (MTA) could also be stored in the database (constructor must be adapted).

Jm2c mbsouth

from dmarc-srg.

liuch avatar liuch commented on May 28, 2024

I'm going to make it possible to use alternative libraries for sending mail.

from dmarc-srg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.