0 Members and 1 Guest are viewing this topic.

*

Pharg

  • *****
  • 3,143
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
SMTP email sending Fix
« on: March 30, 2018, 04:29:58 AM »
Hi Members,

I have found the fix for the SMTP issue either getting a white-page or just not sending.

In the /includes/internal/Functions.php find this on line 499
Code: [Select]
if ( trim( $config['MAIL_TYPE'] ) == '' ) {
$mail_type = 'mail';
}
else {
$mail_type = ($config['MAIL_TYPE']!='MAIL_TYPE')?$config['MAIL_TYPE']:'smtp';
}

Change to this:
Code: [Select]
if ( trim( $config['MAIL_TYPE'] ) == '' ) {
$mail_type = 'mail';
}
else {
$mail_type = ($config['MAIL_TYPE']!='MAIL_TYPE');
}

That's it, all done.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #1 on: June 12, 2018, 12:19:31 PM »
Hi,
My site is not sending mail.
The setup is on a Google Cloud Compute Engine, so I had to use SMTP or Postfix Relay.
Used this manual to get Postfix done: https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid
(I tried Mailgun and Mailjet too, without success.)
 
I have installed and tested postfix on SSH. Tested sending email works.
Code: [Select]
echo 'Test passed.' | mail -s Test-Email EMAIL@EXAMPLE.COM
But when I use the same settings in Osdate, only an error message is showing.

When tried with sendmail, I get the same error.
Issues with mail sending

In my php.ini
Code: [Select]
sendmail_path = "/jet/bin/sendmail -t -i "
Do I need some compatibility?
http://www.postfix.org/COMPATIBILITY_README.html

Or changes in the source of senMimeMail.php or smtp.php?

*

Pharg

  • *****
  • 3,143
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #2 on: June 12, 2018, 11:11:06 PM »
Hi Bart,

Put sendmail back to mail and there won't be any issue.

Quote

I have installed and tested postfix on SSH. Tested sending email works.
Code: [Select]

echo 'Test passed.' | mail -s Test-Email EMAIL@EXAMPLE.COM


But when I use the same settings in Osdate, only an error message is showing.

When tried with sendmail, I get the same error.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #3 on: June 13, 2018, 08:33:02 AM »
Hi Pharg,
With this setting, there is the same message when trying to send an email.

Port 25 is blocked, so Postfix is set to port 2525
But when I open smtp.php I see default port 25


*

CBG

  • *****
  • 960
    • osDate Forum
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #4 on: June 13, 2018, 01:52:59 PM »
Hi Bart,

We are looking into this SMTP issue, we will work on this as fast as possible.
I am going to fully look at the code later today and see, if I can work out the issue, but it may need to be re-written to come up with a fix.
I will post updates to this post, when I have a better idea on what going on, hopefully by tomorrow sometime.

I believe the reason for port 25 being there is it a default just incase it is not set, and should be replaced with the one that is set, in the admin area.

Regards,
CBG (Garry)
PHP: 5.x and 7.x | MySQL: 10.1.31-MariaDB-cll-lve

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #5 on: June 13, 2018, 05:12:21 PM »
ok thank you.
I have tried a clean install on a new instance on Google Cloud Computing. But the same results, sending mail on the command line is working for root and users

The setup on the instance was as following:
Machinetype g1-small
CPU-platform Intel Skylake
Zone europe-west4-c

LAMP Stack PHP 7 Jetware https://console.cloud.google.com/launcher/details/jetware/lamp7
Apache HTTP Server 2.4.25
MySQL 5.7.18
PHP 7.1.4

-----------------------------------

OK, got it ready on a different server setup
It seems to be the Jetware version of LAMP Stack
The clean and regular stack is working https://console.cloud.google.com/launcher/details/click-to-deploy-images/lamp
Now the stack is: Development stack featuring Apache HTTP Server, MySQL, and PHP
Debian 9
Apache 2.4.25
MySQL 5.7.19
PHP 7.0.19

Can you confirm this?

*

Pharg

  • *****
  • 3,143
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #6 on: June 14, 2018, 01:02:12 AM »
Hi Bart,

I have tested the email system in MAIL and in SMTP and I don't get a error or problem, emails get sent.

The SMTP system as CBG said is going to get a update soon.

Here attached are all the emails pics I tested and all went through.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,143
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #7 on: June 14, 2018, 01:05:25 AM »
Here is the SMTP Pics.

Attached below.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #8 on: June 14, 2018, 09:35:05 AM »
Hi Pharg,
Thank you, I have found out it was a problem with the server version.
Normaly a linux server has it's files installed in something like /var/www/html
in Jetware version it is in /jet/var/www/html just as /etc/* are located in /jet/etc/*

*

CBG

  • *****
  • 960
    • osDate Forum
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #9 on: June 14, 2018, 09:43:00 AM »
Hi Bart,

Is this working ok for you now?
Regards,
CBG (Garry)
PHP: 5.x and 7.x | MySQL: 10.1.31-MariaDB-cll-lve

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #10 on: June 14, 2018, 09:50:10 AM »
YEs i have found the solution in using a different server package

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #11 on: June 16, 2018, 03:04:02 PM »
But in the error.log there is still an error
Code: [Select]
sendmail: option requires an argument -- 'f'
sendmail: option requires an argument -- 'f'
sendmail: fatal: usage: sendmail [options]

Sending mail without buffering in database is working, but using the database still doesn't work.

This new server has a different problem. The site is showing, but it cannot load javascript files.
Code: [Select]
GET https://www.site.TLD/templates/FreshDate/css/mobile.css 404 ()
index.php:16 GET https://www.site.com/javascript/functions.js 404 ()
index.php:19 GET https://www.site.com/javascript/enlargeit.js 404 ()
index.php:17 GET https://www.site.com/javascript/validate.js 404 ()
index.php?page=credits:19 GET https://www.site.TLD/javascript/enlargeit.js 404 ()
index.php?page=credits:32 Uncaught ReferenceError: createRequestObject is not defined
    at index.php?page=credits:32

functions.js:1 Failed to load resource: the server responded with a status of 404 ()
float-panel.js:1 Failed to load resource: the server responded with a status of 404 ()
validate.js:1 Failed to load resource: the server responded with a status of 404 ()
functions.js:1 Failed to load resource: the server responded with a status of 404 ()
validate.js:1 Failed to load resource: the server responded with a status of 404 ()
float-panel.js:1 Failed to load resource: the server responded with a status of 404 ()
index.php:450 Uncaught ReferenceError: updateOnlineTime is not defined

*

CBG

  • *****
  • 960
    • osDate Forum
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #12 on: June 16, 2018, 04:28:06 PM »
Hi Bart,

Have you confirmed that the files are there and not missing, and not corrupted
Regards,
CBG (Garry)
PHP: 5.x and 7.x | MySQL: 10.1.31-MariaDB-cll-lve

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #13 on: June 16, 2018, 04:59:03 PM »
Yes
I even tried with a test.php file, but could not open this.
Code: [Select]
Not Found
The requested URL /javascript/test.php was not found on this server.

Could it be something with a js-engine on this server?

*

bart

  • *
  • 16
  • osDate Version: osDateEvo v1.3
Re: SMTP email sending Fix
« Reply #14 on: June 16, 2018, 05:03:46 PM »
When trying to access the folder in Chrome, I get this:
Code: [Select]
Forbidden
You don't have permission to access /javascript/ on this server.