Need to solve SMTP problem with 1and1

I know SuiteCRM doesn’t guarantee installation on shared hosting or on all configuration, but I am pretty good with Linux and I have always been able to make SugarCRM work, so I thought I would give SuiteCRM a change. I performed a clean install on a 1and1 shared hosting site and everything went smoothly until I tried to send SMTP emails. I ran into this problem with SugarCRM and was able to change the $mail method to ‘sendmail’ and everything worked fine. The SuiteCRM version seems to work slightly different.

  1. There is a separate dedicated sendTestEmal function that I was able to change to sendmail…that works fine.
  2. There is an outbound email function that is written differently than the test function and switching the method to sendmail did not fix the problem.

The result is that I have an installation that can send test emails but not the real thing. Can anyone help change over the phpmail method to sendmail?



there are issues with the email in version 7.9.x (you don’t say which version you’re using…).

One of these problems was that the password didn’t get saved correctly in the account settings screen, so the test would work, but not the next attempts to send.

Don’t assume the solution is to change to sendmail. We’re way past that point… that was a long time ago, in Sugar. You should simply focus on getting the PHPMailer problems sorted out in SuiteCRM. You might need to wait for the next release of SuiteCRM.

Meanwhile, you can try to find more in your logs to make sure it’s a bug, and to understand which bug you need to be tracking.

Thanks for the heads up… I read it was a password problem, but I was hoping I could get around it when I was able to get the test email working. I checked to make sure I didn’t have a self-signed SSL, checked it wasn’t autoTSL, so I figured it had to be the actual “email bug.” It’s a pretty big bug considering the goal of a CRM. I was using the last version of SugarCRM Community Edition, and I was dreading the change in case something like this happened. Oh, and for reference, it’s SuiteCRM 7.9.6.

Does the same problem exist in 7.8.7? Because email doesn’t work there either…

The Email module in 7.8.x is completely different from the one in 7.9.x. Most of the problems with the new module are not present in 7.8.x.

However, not all the problems were facing are related to the new module. There is a very hard to crack SMTP bug affecting everyone. It might be a bug with PHPMailer, the software that SuiteCRM uses; or it might be a bug with SuiteCRM itself (but I don’t think so). It could also be a problem in some email providers, since it doesn’t happen for all of them.

If your problem is the SMTP bug, this script will help you debug it:

Thanks for the reply… I’ve already debugged the mailer in 7.8.x and it is working fine. I wasn’t happy with the email template creation, so I am thinking about switching to another CRM. I also ran into the “undefined” button problem, which seemed to be related to a .js file not loading, and it was something I had not seen before 7.8.x. Either way, the email marketing templates are the most important aspect of my CRM use, and I didn’t like the way SuiteCRM built theirs out. Is it different in 7.9.x?

Note that there are new versions out today, some email bugs have been fixed, both in 7.9.x and 7.8.x.

The templates use TinyMCE or direct HTML. I think there are a few additional options in 7.9.x regarding selection of templates editor, but I don’t think it’s anything too fancy, not that big a change.

What exactly do you dislike?

I don’t think I was using either of those email clients. I want to say it was Kaicz…or something like that. It didn’t accept pure HTML unless I added a predesigned element as the first thing in the email. I chose the header, but my ability to import HTML straight to the editor didn’t work…nothing saved.

Maybe you were using Mozaik.

Just try every option again in the new versions. Bugs have been fixed.

TinyMCE might do the trick for you; if not, direct HTML means you can use an external editor, many are available.

Okay…let’s give this another shot. I appreciate your help. Here is my list of things that are going wrong. Maybe you can help.

  1. I’m getting the “defined” error on a number of dialogue boxes. I have changed my permissions and done a rebuild. The problem seems to be with the .htaccess file which I cannot rebuild through the UI. When I try to rebuild it the system doesn’t confirm it has been rebuilt.

  2. I’m not really sure how to change the email editor. I vaguely remember seeing the option, but I really can’t use Moziak to do emails. Where is the option to change editors?

  3. The DB.versions table was not created during installation. I don’t think it is a big deal…it’s just a little weird to always see that error in the log. I would backtrack through the installation script to see if it was left out, but it seems like a lot of effort for a table that appears to be tracking what version of the software I am using.

4.The recurring time zone error in the log is also annoying. Is there any way to get rid of it?


Just downloaded and installed the new version…the undefined error is gone.

Nevermind…it’s broken again. That was weird. Suite worked for two hours then quit.

About the email editor choice: in v.7.9.x, click your user name at the top-right, or open that menu and select profile. Scroll to the bottom.

Apart from that: your installation is clearly not correct yet. Multiple undefined errors usually mean problems with ownership and/or permissions. Sometimes these issues are tricky to really fix, so we might need to go into more detail here.

Then there is the issue of the cron jobs, another important part of the set up. This normally uses a different php.ini so your timezone errors could be coming from there. You really need to fix that error, it is a FATAL error, it’s stopping PHP on its tracks and breaking things. Check the part of this recent thread that deals with php.ini, you’ll find instructions there:

Also, the cron jobs need to run under the same user as the SuiteCRM app, otherwise they will access files and leave them with bad permissions. This might explain cases of degrading permissions (was working fine, then broke again).

Do you have SSH access to your server?

I ended up staying on v7.8.x, the emailer was easier to debug. I’m found a workaround for what I was trying to do in email. I started editing templates via Template Section Line. Are you familiar with how that works? It’s probably the best solution to what I am trying to do.

Regarding my time zone error - it may be showing the log as a fatal error, but my cronjob is performing all of the other tasks as scheduled so I can’t really say I’m all that worried about it. I’m looking for the best version of PHP to run the cron job. So you have a suggestion? Right now I’m running php7-cli but I can run any version.

I have SSH access…

I’ll probably do some more debugging later. I’ll let you know how it goes.

I recommend PHP 7.x, yes. Faster and safer.

You need to fix all FATAL errors, they always means some program is stopping abruptly, you don’t know how much damage/incoherence that might cause. If you allow yourself to run a system with regular FATAL errors, you’re inviting random problems.

It’s pretty easy to fix that Timezone error, all it takes is a simple setting in the correct php.ini.

I copied a local php.ini file to the root folder and switched the timezone…the error still appears in the log. When checking the info.php file in diagnostics the timezone appears to be correct. Thoughts?


the cron jobs are probably using a different php.ini (for CLI) and they are probably generating that timezone error. If you see the error every minute, or at a regular interval corresponding to a specific Scheduler job, that should be it.

How exactly did you configure your cron jobs?

Try this on a SSH command-line:

php -i | grep timezone

The command didn’t produce an output via the terminal. I didn’t receive an error, but I didn’t receive an output either. I’m getting the timezone error at regular intervals, so I assume you’re right about the error being associated with the cronjob. I’m going to run the cronjob using a different version of PHP and see if that helps. I’m going to wait an hour and run the diagnostic process again.

If you do just

php -i

do you get a long listing with the entire PHP config? If so, then the absence of the output with grep simply means it (timezone parameter) is not set.

To set it, normally you add it to the php.ini of the CLI (which is a different file from the php.ini of the Web server). If you’re hosting doesn’t facilitate this, you can try other ways.

This is an attempt to pass that setting through the command-line when calling cron (I don’t know if it works):

* * * * * cd /whatever/directory/htdocs/suitecrm/SuiteCRM; php -d date.timezone="Europe/London" -f cron.php > /dev/null 2>&1 

I set the time zone, so the error went away, but it didn’t fix my SMTP problem. I still can’t send test emails.