webERP Forum

Full Version: SMTP Server Woes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have had no success with SMTP Server mail setup. When attempting to email All I get is a hung page. I have done some preliminary debugging but have found no success.

This is not my first rodeo so I figured I'd ask all of you before digging in deeper. I have many other web-based applications on our servers using SMTP email (SuiteCRM, MantisBT, TUTOS, DoxBox, etc.) and I have had no issues. I am using the exact same settings that I am using for the other applications.

Have any of you experiences issues with SMTP as I am? If so do you have any suggestions?
smtp mail is not necessary - but need to get the mail function working on php on the server. The php.ini is the place to get this going - if you are using a windows PHP/web-server then you need to configure the smtp server in php.ini

http://php.net/manual/en/mail.configuration.php
I am using ClearOS (CENTOS) so I will have look at it from that end.

Windoze? Never ever again for a server!!!

Thank you Phil.
Okay... I have gone all through this to the best of my ability and I can find no answers. The ISP for the email/domain in this case is GoDaddy and they can be a real pain which is why we use SMTP for all the other web-based applications. I setup SMTP relay in ClearOS and I can send emails just fine from there but not from webERP.

As I look around I notice all the other web-based applications on our deck are using phpmailer. Has anybody considered changing webERP to phpmailer in lieu of what we have now?

Am I really the only one who has this problem and can not get SMTP to work?


Five hours of messing with this... I have MANY web-based applications on my test server and this is the only one that will not play...

For such a fine application (or the user) to be brought to its knees by SMTP is VERY disappointing...
Okay so after a lot more testing...

SMTP settings used for SuiteCRM on the same server do not work for webERP.

I tried some other SMTP settings from other email accounts and while they appear to work (i.e., page does not hang) no emails are ever received.

I am using port 587 (no SSL) per GoDaddy so perhaps this is some sort of SSL thing that causes grief with webERP but not all the other web apps using SMTP?

Quite a painful mystery... Thanks very much GoDaddy...
If you do not have sendmail on your server you can use mini sendmail - it does all you need it to do for webERP

https://wiki.mattrude.com/Mini_sendmail

Quote:mini_sendmail with php
Some linux distributions do not include sendmail in their base installation. Other folks may not want to run sendmail. Either way, if you want to use PHP's mail() function and you do not have a mail server installed locally, you need to find another way for mail() to sucessfully send email from a PHP script. mini_sendmail is a good choice for a basic, "I only need to send mail for testing on my development server" type of environment.

Download and compile mini_sendmail (above).
Create a symbolic link, so it looks like sendmail really exists:
ln -s /usr/local/sbin/mini_sendmail /usr/sbin/sendmail
Edit your php.ini file to use appropriate options for sending mail: ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -ftest@example.com -smail.example.com
Restart apache and that's it.
Notes: I found I needed to supply the From address in the sendmail path; otherwise the mail server I was using would not send the email. I also found that I compiled PHP without setting up mini_sendmail first, so PHP kept giving me the error about mail() not being a declared function. I chose that as a sign to upgrade to PHP 5.2.2. Install mini_sendmail first, then install PHP.
Of course webERP's smtp setting can then be set to off
The reason that the SMTP settings were used to send emails was that many ISPs don't allow an SMTP server to prevent spammers using their network, so someone running their own server behind the company internet connection may not be able to run an SMTP server so the system must allow these people to send documents by email, hence we include the SMTP server settings.

I just looked at my code and at some time I moved to using PHPMailer (https://github.com/PHPMailer/PHPMailer) at the suggestion of a colleague and I have just tested it and it works fine. I can share the code he gave me to do this if it helps anyone?

Thanks
Tim
(12-10-2017 08:33 AM)falkoner Wrote: [ -> ]The reason that the SMTP settings were used to send emails was that many ISPs don't allow an SMTP server to prevent spammers using their network, so someone running their own server behind the company internet connection may not be able to run an SMTP server so the system must allow these people to send documents by email, hence we include the SMTP server settings.

I just looked at my code and at some time I moved to using PHPMailer (https://github.com/PHPMailer/PHPMailer) at the suggestion of a colleague and I have just tested it and it works fine. I can share the code he gave me to do this if it helps anyone?

Thanks
Tim

Tim,

Correct about emails being bounced and rejected due to ISP(s).

If it is not too much to ask that would be great in our case if you would share the code changes. I dropped in the phpmailer folder and was just about to embark on that project myself but time has become critical and I am worried that I can complete it in time.

Any help is GREATLY appreciated!!!

Paul
Hi Paul, I have emailed you the relevant files as it is easier than posting them here, but if anybody else wants them just send me an email on tim@weberpafrica.com and I will be happy to help.

Tim
Reference URL's