Forums | Mahara Community
Support
/
Emails not sent using Contact Us page
27 January 2017, 4:51
Hello everyone!
We have recently deployed our Mahara site and are experiencing issues receiving emails when the “Contact Us” form is being used. I have checked the forum and ensured that the notifications are all set to “Email” and the Admins are still unable to receive these contact us emails. We use Gmail for our email service and also checked the “Email Settings” under “Site Options” and these settings all setup correctly as well. Cron is not enabled and there is no error displayed when using the “Contact Us” form.
Can anyone offer an insights or possible solutions to these issues? Your assistance is greatly appreciated!
Cheers,
Aimee
27 January 2017, 8:35
Hi Aimee,
Do you receive any other mails from Mahara? Did you make any changes to the contact us form?
Are there any errors in your error log in Mahara or the mail server on your system?
Cheers
Kristina
27 January 2017, 10:36
Hi Kristina,
Thank you for such a speedy response to my question! We have not made any changes to the Contact form and our email server does not return any errors. I was receiving various notification errors in my in box related to new wall posts, friend requests, and email failures. Here is one:
exception 'EmailException' with message 'Couldn't send email to Collin Peterson (admin) with subject Bethel University ePortfolio: User notification error was probably caused by your server configuration.. Error from phpmailer was: SMTP connect() failed. https: //github.com/PHPMailer/PHPMailer/wiki/Troubleshooting' in /home/bethelsu/public_html/eportfolio/lib/user.php:890
Stack trace:
#0 /home/bethelsu/public_html/eportfolio/notification/email/lib.php(92): email_user(Object(stdClass), NULL, 'Bethel Universi...', 'You have been s...', NULL, NULL)
#1 [internal function]: PluginNotificationEmail::notify_user(Object(stdClass), Object(stdClass))
#2 /home/bethelsu/public_html/eportfolio/lib/mahara.php(1753): call_user_func_array(Array, Array)
#3 /home/bethelsu/public_html/eportfolio/lib/activity.php(781): call_static_method('PluginNotificat...', 'notify_user', Object(stdClass), Object(stdClass))
#4 /home/bethelsu/public_html/eportfolio/lib/activity.php(851): ActivityType->notify_user(Object(stdClass))
#5 /home/bethelsu/public_html/eportfolio/lib/activity.php(74): ActivityType->notify_users()
#6 /home/bethelsu/public_html/eportfolio/lib/activity.php(42): handle_activity(Object(stdClass), Object(stdClass))
#7 /home/bethelsu/public_html/eportfolio/lib/activity.php(803): activity_occurred('maharamessage', Object(stdClass))
#8 /home/bethelsu/public_html/eportfolio/lib/activity.php(851): ActivityType->notify_user(Object(stdClass))
#9 /home/bethelsu/public_html/eportfolio/lib/activity.php(74): ActivityType->notify_users()
#10 /home/bethelsu/public_html/eportfolio/lib/activity.php(42): handle_activity(Object(stdClass), Object(stdClass))
#11 /home/bethelsu/public_html/eportfolio/blocktype/wall/lib.php(249): activity_occurred('wallpost', Object(stdClass), 'blocktype', 'wall')
#12 [internal function]: PluginBlocktypeWall::wallpost_submit(Object(Pieform), Array)
#13 /home/bethelsu/public_html/eportfolio/lib/pieforms/pieform.php(543): call_user_func_array(Array, Array)
#14 /home/bethelsu/public_html/eportfolio/lib/pieforms/pieform.php(164): Pieform->__construct(Array)
#15 /home/bethelsu/public_html/eportfolio/lib/mahara.php(4795): Pieform::process(Array)
#16 /home/bethelsu/public_html/eportfolio/blocktype/wall/lib.php(189): pieform(Array)
#17 /home/bethelsu/public_html/eportfolio/blocktype/wall/lib.php(51): PluginBlocktypeWall::wallpost_form(Object(BlockInstance))
#18 [internal function]: PluginBlocktypeWall::render_instance(Object(BlockInstance))
#19 /home/bethelsu/public_html/eportfolio/lib/mahara.php(1753): call_user_func_array(Array, Array)
#20 /home/bethelsu/public_html/eportfolio/blocktype/lib.php(1017): call_static_method('PluginBlocktype...', 'render_instance', Object(BlockInstance))
#21 /home/bethelsu/public_html/eportfolio/lib/view.php(2079): BlockInstance->render_viewing(false)
#22 /home/bethelsu/public_html/eportfolio/lib/view.php(2033): View->build_column(1, 2, false, false)
#23 /home/bethelsu/public_html/eportfolio/lib/view.php(2018): View->build_columns(1, false, false)
#24 /home/bethelsu/public_html/eportfolio/user/view.php(92): View->build_rows()
#25 {main}
In testing this issue, we have completely removed the email information from the email settings, in the site options area. I am no longer receiving notification errors in my inbox on the Mahara site but also still not receiving Contact Us emails.
Cheers,
Aimee
29 January 2017, 17:22
Hello Aimee,
The error message mentions that Mahara couldn't connect to SMTP, i.e. your mail server and provides a link to a troubleshooting page. Did your IT support check it out and check the server settings?
Also, please make sure you are on the latest minor point release for your version of Mahara.
Cheers
Kristina
31 January 2017, 5:49
Hi Kristina!
Yes, our IT Manager has looked at the server and checked all settings. We do not receive any email errors from the server, the server reads as though the emails are being sent.
I have tried using host info: smtp.gmail.com and removing the smtp host information from the Site Options/Email Settings area and the server is not returning any errors. I have turned on "less secure-apps" in gmail.
We are running: Mahara version 16.10.2 (2016090213)
Could there be other settings within Mahara that I should look at changing?
Aimee
31 January 2017, 10:45
Hello everyone!
We have successfully fixed this issue on our Mahara site! As Kristina mentioned, there was an issue with our config line.
We needed to go into database -> config -> (line) _cron_lock_core_activity_process_queue and completely delete this line.
After doing this, we received a stream of test emails from our Contact Us page which we had previously sent.
Now, our cron is running correctly, we were seeing a message previously that our cron was not running even though we had configured it.
Aimee
21 February 2017, 9:15
Hello Aimee,
Great that you could fix your problem and that you shared your solution.
Cheers
Kristina