GithubHelp home page GithubHelp logo

Comments (13)

brunnopleffken avatar brunnopleffken commented on May 27, 2024

I'm using PHPMailer as e-mail client, the Email() class (in kernel/Email.php) is more like an abstraction class to define settings, etc. I tested it using my two e-mail accounts in Gmail and Outlook.com. I'll try to do another tests, check if there's a newer version of PHPMailer released, etc.

from addictive-community.

halojoy avatar halojoy commented on May 27, 2024

I will test using port 465. I did test 25 and 587, but both gave error.
But I have my own software and can send mail() without any problem. So, I find it strange it does not work. I have of course the setting in php.ini = smtp.alltele.net and port = 25

Port 465 did not work. Now I have tested 25,465,587 with no luck.

from addictive-community.

halojoy avatar halojoy commented on May 27, 2024
    // Check if e-mail information is empty
    if($config['general_email_smtp'] == "" ||
       $config['general_email_authentication'] == "" ||
       $config['general_email_username'] == "" ||
       $config['general_email_password'] == ""
    ) {
        Html::Error("<b>Mailer Error:</b> You're unable to send e-mails. Check your SMTP settings in "

Of course I leave auth, username and password empty.
I do not use authentication for to send email.

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 27, 2024

Nice! Turning these lines into:

// Check if e-mail information is empty
if($config['general_email_smtp'] == "" ||
   $config['general_email_authentication'] == ""
) {
    Html::Error("<b>Mailer Error:</b> You're unable to send e-mails. Check your SMTP settings in "

...everything works fine?
If it does, can you send a PR?

from addictive-community.

halojoy avatar halojoy commented on May 27, 2024

If you want to test for empty, then you should first see if Auth is set.
After this you have one test for Auth,username,password and one without which dows not test this.

I have finally got Validation mail to work.
The problem was in this line:
//$this->Mail->SMTPAuth = $config['general_email_authentication'];
var_dump of that variable shows a String 5 chars: "false"
which is not the same as false.

This works: $this->Mail->SMTPAuth = false;
So, you should test if string is = "true" or "false" to determine the boolean value.

from addictive-community.

halojoy avatar halojoy commented on May 27, 2024

TLS or SSL.
TLS is better. It is a replacement for SSL.
SSL is deprecated and should not be used generally.
I suggest you take away the choice of TLS/SSL and use only TLS.

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 27, 2024

Two fixes sent:

  • Convert string to boolean ("false" is considered TRUE because it's not an empty string);
  • Username and password can be left blank.

Try to run git pull and see if this is enough to make Email() work with your server environment.

About the TLS, yeah, TLS is the most common one, but it's set this way by default, and I think it's nice to let the possibility to choose between one another.

Thanks!! ;)

from addictive-community.

halojoy avatar halojoy commented on May 27, 2024

When storing false and true in a MySQL TEXT field,
it is a good idea to use "0" and "1".
The string "0" is interpreted as false in PHP. (Also of course an empty string can be used.)
I did see you have several other fields with "false" and "true"

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 27, 2024

I started to perform this, change all true/false strings to 0/1 (still strings though). The database and Admin CP is already migrated, but I still need to change the controllers (they're validating == "true" and == "false")... I gave a break, but I want to finish this in the next few hours!

from addictive-community.

halojoy avatar halojoy commented on May 27, 2024

Hello.
I have a slightly modified version with 0.7.0, where I got email working.
Today I downloaded and installed 'development' version.
Installation went fine. But I can not get Email validation to work.
It is very strange.
I use mail->SMTPDebug = 2
And the output of debug shows only good. But no email comes in my inbox.
mail->send() returns true.

Here is output of SMTPDebug:
2015-07-22 17:07:30 SERVER -> CLIENT: 220 smtp.alltele.net ESMTP IceWarp 11.2.0.1 x64; Wed, 22 Jul 2015 19:07:30 +0200 2015-07-22 17:07:30 CLIENT -> SERVER: EHLO 188.122.128.27 2015-07-22 17:07:30 SERVER -> CLIENT: 250-smtp.alltele.net Hello 188.122.128.27 [188.122.128.27], pleased to meet you. 250-ENHANCEDSTATUSCODES 250-SIZE 41943040 250-EXPN 250-ETRN 250-ATRN 250-DSN 250-CHECKPOINT 250-8BITMIME 250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5 GSSAPI 250-STARTTLS 250-VRFY 250 HELP 2015-07-22 17:07:30 CLIENT -> SERVER: STARTTLS 2015-07-22 17:07:30 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS 2015-07-22 17:07:30 CLIENT -> SERVER: EHLO 188.122.128.27 2015-07-22 17:07:30 SERVER -> CLIENT: 250-smtp.alltele.net Hello 188.122.128.27 [188.122.128.27], pleased to meet you. 250-ENHANCEDSTATUSCODES 250-SIZE 41943040 250-EXPN 250-ETRN 250-ATRN 250-DSN 250-CHECKPOINT 250-8BITMIME 250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5 GSSAPI 250-VRFY 250 HELP 2015-07-22 17:07:30 CLIENT -> SERVER: MAIL FROM:<> 2015-07-22 17:07:30 SERVER -> CLIENT: 250 2.1.0 <>... Sender ok 2015-07-22 17:07:30 CLIENT -> SERVER: RCPT TO: 2015-07-22 17:07:30 SERVER -> CLIENT: 250 2.1.5 ... Recipient ok; will forward 2015-07-22 17:07:30 CLIENT -> SERVER: DATA 2015-07-22 17:07:30 SERVER -> CLIENT: 354 Enter mail, end with "." on a line by itself 2015-07-22 17:07:30 CLIENT -> SERVER: Date: Wed, 22 Jul 2015 17:07:30 +0000 2015-07-22 17:07:30 CLIENT -> SERVER: To: halojoy 2015-07-22 17:07:30 CLIENT -> SERVER: From: 2015-07-22 17:07:30 CLIENT -> SERVER: Subject: [ADDICTIVE DEV] New Member Validation 2015-07-22 17:07:30 CLIENT -> SERVER: Message-ID: 2015-07-22 17:07:30 CLIENT -> SERVER: X-Priority: 3 2015-07-22 17:07:30 CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.8 (https://github.com/PHPMailer/PHPMailer/) 2015-07-22 17:07:30 CLIENT -> SERVER: MIME-Version: 1.0 2015-07-22 17:07:30 CLIENT -> SERVER: Content-Type: text/html; charset=iso-8859-1 2015-07-22 17:07:30 CLIENT -> SERVER: Content-Transfer-Encoding: 8bit 2015-07-22 17:07:30 CLIENT -> SERVER: 2015-07-22 17:07:30 CLIENT -> SERVER: Hello honolulu,

Before you can start posting in ADDICTIVE DEV, you must confirm your e-mail address. Please, confirm your e-mail address by clicking on the link below:

http:///register/validate?m=8&token=1126bfb31206cb978dcb77a9d0ef2a93

If you cannot click on the link, copy and paste the address into your browser manually.

Thanks. See you there!
Administration 2015-07-22 17:07:30 CLIENT -> SERVER: 2015-07-22 17:07:30 CLIENT -> SERVER: . 2015-07-22 17:07:30 SERVER -> CLIENT: 250 2.6.0 793 bytes received in 00:00:00; Message id 201507221907308875 accepted for delivery 2015-07-22 17:07:30 CLIENT -> SERVER: QUIT 2015-07-22 17:07:30 SERVER -> CLIENT: 221 2.0.0 smtp.alltele.net closing connection

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 27, 2024

Weird... Reading the log, seems like you've successfully sent the message.
Changing the SMTP server, does everything work fine? Does it happen only with this specific server?

from addictive-community.

halojoy avatar halojoy commented on May 27, 2024

Yes, everything looks fine.
I explained in my last pull request.
I had empty mail->From in my config.
Most mail servers will not accept sending without a from email.
But I have fixed a check in my pull request.

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 27, 2024

Nice. This seems to be solved then!
Thanks!!!

from addictive-community.

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.