Firefox PHP

Modules Send Mail Through SMTP

Posted by mike60 
Modules Send Mail Through SMTP
May 12, 2017 09:22PM
I keep getting a 500 PHP error and I have tried several options and none are working. I tried SSL and TLS as well as the recommended port and the default port. I keep getting the error. I have the latest Phorum download but I'm not sure if this module is a separate download if there is a new version. I have to use SMTP as my web host requires it.

Can someone help?

Thanks,
Re: Modules Send Mail Through SMTP
May 13, 2017 05:41PM
What permissions are set on the SMTP file? 644 should work, 777 should not, number in between may work. This is host dependent.

Script timeout waiting on external connection?
Check the web server, and php logs.
Re: Modules Send Mail Through SMTP
May 19, 2017 09:04PM
What do you mean by "the SMTP file" what file are you referring to?

My website is hosted so do I need to contact my host provider or is this something I can fix by going to my "control panel" for my website?

I keep getting this error when posting to the forum:


This page isn’t working

www.nameofmywebsite.com is currently unable to handle this request.
HTTP ERROR 500
Re: Modules Send Mail Through SMTP
May 20, 2017 01:39PM
When you installed the module, you did save/submit the changes in the admin, and the module settings page?

The module files and directory need to have the correct permissions. These should be the same as the other installed modules. Your control panel should allow you to change these, try the file manager. Under permissions probably. An ftp uploading program may also allow you to change the permissions.

ERROR 500 should also leave a message in the server log file. Some Hosts will expose these in your control panel, some will not. Look for an "error log" in the control panel. Otherwise ask your host.


your php.ini needs the correct sendmail_path looks like " sendmail_path = /usr/bin/msmtp -t " but yours may be different. Your Host may have set this, or you may have your own php.ini, to which you may need to add it. Your host will be able to tell you if you need to add this, and the exact path. Some control panels provide this information.
Re: Modules Send Mail Through SMTP
May 20, 2017 04:43PM
Hello - when I installed the latest version, it already included the forum/mods/smtp_mail folder. I used my FTP to upload all the files when I installed the latest version.

<<When you installed the module, you did save/submit the changes in the admin, and the module settings page?

Yes, I went to [mywebsite.com]

I'm still not sure what the filename is that should be set with permissions to 644. What is the filename of the smtp file. Is it php.ini? If so, what folder would I find it in?

My host is trying to assist me to resolve the problem.

Thanks,
Mike
Re: Modules Send Mail Through SMTP
May 20, 2017 11:01PM
If the module is installed with Phorum, and everything else works, then the permissions are probably correct.
Re: Modules Send Mail Through SMTP
May 24, 2017 07:47PM
I still have not resolved this problem. I did run a test though and decided to put the wrong password in at the SMTP module to see what happens and I still get the same error. I'm wondering, if I enter the wrong password, if that is what should happen or what happens when one enters the wrong password in the SMTP module?

I'm trying to figure out what information I can provide to my host provider to resolve this problem.

(Edited)
We have definitely isolated it to the SMTP module because it sends Emails just fine when the module is turned off but they require me to use the module.

Thanks,



Edited 2 time(s). Last edit at 05/25/2017 12:16AM by mike60.
Re: Modules Send Mail Through SMTP
May 27, 2017 01:36AM
RESOLVED. The 500 Error was resolved.

RESOLVED - My host provider was able to resolve the problem after a lot of work.

I have version 5_2_23.

The error was fixed by editing the smtp_mail.php file in the mods\smtp_mail folder.

They changed this:

try {
require_once("./mods/smtp_mail/phpmailer/class.phpmailer.php");

to this:
try {
require ("./mods/smtp_mail/phpmailer/class.smtp.php");
require_once("./mods/smtp_mail/phpmailer/class.phpmailer.php");
Re: Modules Send Mail Through SMTP
May 27, 2017 04:54AM
Correction - not resolved yet. It seems that it will Email the moderator but if I sign in as another user to test and Follow Topic and check Email Replies then I get this error: Cannot redeclare class SMTP in forum\mods\smtp_mail\phpmailer\class.smtp.php on line 28

How can I get a working SMTP module?
Re: Modules Send Mail Through SMTP
May 29, 2017 03:28AM
Hi Mike,

please try to upgrade the phpmailer part of this module. Phorum ships version 5.2.10 of phpmailer. Here you can find 5.2.23: [github.com]

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Modules Send Mail Through SMTP
July 23, 2022 11:35PM
I was also having this issue, and finally solved it with a couple tweaks.

First, in smtp_mail.php comment out line 38 and add:
//            require_once("./mods/smtp_mail/phpmailer/class.phpmailer.php");
            require_once("./mods/smtp_mail/phpmailer/PHPMailerAutoload.php");

Then also, in the setting page I had the hostname as:
smtp.mydomain.com

but it needed to be in this format:
ssl://smtp.mydomain.com

...
Steve H, currently on: (version 5.2.23)
contributions:
Birthdays mod, Top Users mod, Icon legend.tpl, (plus a handful of bugfixes and old 5.0 creations)
Sorry, only registered users may post in this forum.

Click here to login