Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not instantiate mail function. #346

Open
rogereab opened this Issue Jul 6, 2018 · 9 comments

Comments

Projects
None yet
4 participants
@rogereab
Copy link

rogereab commented Jul 6, 2018

I see that this has been asked before with no real answer.

What have I missed?

Set everything up and all works very well apart from the fact that I cannot add a new user fully or change email address as it cannot start the email system up and the following message appears in the top left of the browser window.

"Could not instantiate mail function."

Is there something else to install/set up or tweak, I've looked but cannot find anything.

Is this a hosting issue, I use Siteground in Europe.

Thanks, any help appreciated

Roger B

@siva538

This comment has been minimized.

Copy link

siva538 commented Jul 27, 2018

Hi Roger, I couldn't find any direct UI provision where the SMTP can be configured. However there were some underlying php pages the application is using "PHP-MAIL", and it might work when configured with the appropriate SMTP server. You can give it a try.

@rogereab

This comment has been minimized.

Copy link
Author

rogereab commented Jul 31, 2018

Thanks for your response. I looked closely and searched the whole system for the wording "Could not instantiate mail function." but couldn't find it within the owa folder.
I've attached a screenshot that shows that the email has been sent as far as the OWA system is concerned but it may be something on the hosting side that returns the "Could not instantiate mail function." wording!

screen shot 2018-07-31 at 14 46 54

@rogereab

This comment has been minimized.

Copy link
Author

rogereab commented Jul 31, 2018

OK, looked closer and found what is needed. Can't seem to get past the $from where it objects to the field. maybe it needs a later version of PHP mailer?

@rogereab

This comment has been minimized.

Copy link
Author

rogereab commented Sep 6, 2018

So . . as I'm using this on a sub domain I didn't want to risk other problems as I have many email accounts sitting there.
So I modified the 'class.phpmailer.php' file with some hard coded details (yes I know its a problem when updating) but it now works as it should!
This will do until I can figure out what exactly I should put in the php.ini file to make it work.
Anybody know as a Google search produces all sorts of wrong answers - and I know because I've tried many of them, some of which crashed the script!
All help appreciated!

@JeusuDigital

This comment has been minimized.

Copy link

JeusuDigital commented Jan 22, 2019

I fixed this by updating PHP Mailer to 5.2.27, just upload PHPMailer-5.2.27 folder under /includes and then update the define path in owa_env.php

@rogereab

This comment has been minimized.

Copy link
Author

rogereab commented Jan 22, 2019

Thanks for the information. I did as you said and it has fixed the initial problem of "Could not instantiate mail function" but unfortuately does not send the email whereas if I hard code my details in it does send the email. Any help appreciated!

@JeusuDigital

This comment has been minimized.

Copy link

JeusuDigital commented Jan 22, 2019

That is probably down to your server environment as I receive the emails on my servers after doing that, though it is probably better to hard code SMTP anyway, I will probably do that too.

@padams

This comment has been minimized.

Copy link
Owner

padams commented Jan 22, 2019

@rogereab

This comment has been minimized.

Copy link
Author

rogereab commented Jan 23, 2019

The hard coding I carried out was in the 'class.phpmailer.php' which seemed to work ok but of course was a problem when upgrading in the future.
I don't understand how hard coding works but normal operation doesn't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.