Forums | Mahara Community

Support /
Email problem

anonymous profile picture
Account deleted
Posts: 4

18 December 2012, 7:13


I'm having a problem with my email setup.  I keep gettiing these errors (below).  I'm running version 1.6.2. , on Centos, PHP 5.3.3.  I've tried my mail server and gmail.

User notification error was probably caused by your server configuration.
exception 'EmailException' with message 'Couldn't send email to  with subject Mahara: New message from Admin User (admin). Error from phpmailer was: SMTP Error: Could not connect to SMTP host.' in /var/www/html/mahara/lib/user.php:643
Stack trace:
#0 /var/www/html/mahara/notification/email/lib.php(102): email_user(Object(stdClass), Object(stdClass), 'Mahara: New mes...', 'You have been s...', NULL, NULL)
#1 [internal function]: PluginNotificationEmail::notify_user(Object(stdClass), Object(stdClass))
#2 /var/www/html/mahara/lib/mahara.php(1359): call_user_func_array(Array, Array)
#3 /var/www/html/mahara/lib/activity.php(468): call_static_method('PluginNotificat...', 'notify_user', Object(stdClass), Object(stdClass))
#4 /var/www/html/mahara/lib/activity.php(507): ActivityType->notify_user(Object(stdClass))
#5 /var/www/html/mahara/lib/activity.php(82): ActivityType->notify_users()
#6 /var/www/html/mahara/lib/activity.php(50): handle_activity(Object(stdClass), Array)
#7 /var/www/html/mahara/lib/user.php(1479): activity_occurred('usermessage', Array)
#8 /var/www/html/mahara/user/sendmessage.php(117): send_user_message(Object(stdClass), 'test', NULL)
#9 [internal function]: sendmessage_submit(Object(Pieform), Array)
#10 /var/www/html/mahara/lib/pieforms/pieform.php(514): call_user_func_array('sendmessage_sub...', Array)
#11 /var/www/html/mahara/lib/pieforms/pieform.php(161): Pieform->__construct(Array)
#12 /var/www/html/mahara/lib/pieforms/pieform.php(71): Pieform::process(Array)
#13 /var/www/html/mahara/user/sendmessage.php(105): pieform(Array)
#14 {main}

anonymous profile picture
Account deleted
Posts: 197

18 December 2012, 16:46

Hi Phillip,

Looking at this bit on the second line, "Couldn't send email to  with subject Mahara", I wonder, do you have any users without email addresses set?

I seem to recall that this sometimes this happens through when importing them from csv or mahoodle setups.

Do any rows show up for the following query?

select id, username, email from usr where email = '';

Even if that comes up with no rows, It would also be worth looking at all the addresses incase there are some odd characters or something in the email address field that aren't showing in your log:

select id, username, email from usr;

Try adding addresses for users who lack them, if there are any. If all the users have valid email addresses.


anonymous profile picture
Account deleted
Posts: 4

19 December 2012, 5:58


I did find one user without an email address.  I was able to delete that user.

All the addresses look good.  No change.



3 results