Omeka Not Sending Email

My installation of Omeka is not sending emails to anyone. It is running on Ubuntu 14.04 and Nginx.

After enabling logging and creating a new user, my error.log says:

2017-10-05T12:24:53-04:00 ERR (3): exception 'Zend_Mail_Protocol_Exception' with message ''' does not match the expected structure for a DNS hostname, '' does not appear to be a valid URI hostname, '' does not appear to be a valid local network name' in /usr/share/nginx/html/history/application/libraries/Zend/Mail/Protocol/Smtp.php:195
Stack trace:
#0 /usr/share/nginx/html/history/application/libraries/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('')
#1 /usr/share/nginx/html/history/application/libraries/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#2 /usr/share/nginx/html/history/application/libraries/Zend/Mail.php(1201): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3 /usr/share/nginx/html/history/application/controllers/UsersController.php(395): Zend_Mail->send()
#4 /usr/share/nginx/html/history/application/controllers/UsersController.php(174): UsersController->sendActivationEmail(Object(User))
#5 /usr/share/nginx/html/history/application/libraries/Zend/Controller/Action.php(516): UsersController->addAction()
#6 /usr/share/nginx/html/history/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('addAction')
#7 /usr/share/nginx/html/history/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#8 /usr/share/nginx/html/history/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#9 /usr/share/nginx/html/history/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#10 /usr/share/nginx/html/history/application/libraries/Omeka/Application.php(77): Zend_Application->run()
#11 /usr/share/nginx/html/history/admin/index.php(28): Omeka_Application->run()
#12 {main}

I have the /application/config/config.ini file setup to use SMTP through Gmail using TLS and port 587.
Any idea what the problem could be or what other info I can provide to gain further assistance?

Thanks

Can you share your SMTP configuration section? (Obviously, blank out any sensitive information)

;;;;;;;;
; Mail ;
;;;;;;;;
;
; For more info, see Zend Framework documentation on Zend_Mail:
; http://framework.zend.com/manual/en/zend.mail.html

; mail.transport.type
; The system Omeka will use to send email messages.
; default: "Sendmail"
;
; The default is to send mail using PHP's built-in mail() function.
;mail.transport.type = "Sendmail"

; Uncomment some of the following lines (and comment the above line)
; to switch to SMTP for sending mail through Omeka. Your configuration
; may not require all of the options listed.
;
 mail.transport.type = "Smtp"
 mail.transport.host = "smtp.gmail.com"
 mail.transport.port = 587     ; Port number, if applicable.
 mail.transport.name = ""      ; Local client hostname, e.g. "localhost"
 mail.transport.auth = "login" ; For authentication, if required.
 mail.transport.username = "sender@domain.org"
 mail.transport.password = "Password"
 mail.transport.ssl = "tls"       ; For SSL support, set to "ssl" or "tls"

You need to fill in the mail.transport.name line. The error message you sent at the top of the thread is Gmail’s server complaining that you’re identifying yourself as coming from '', the empty string.

That fixed it.

I’m glad it was something so simple. Thanks

Hey … i have the problem as above … when i want to try the forgot password feature but but the message appears like this …


and i am not too
quite familiar with programming

Could you post up the same configuration information that John discussed above?

Dear All,

I would like to use the contact form, and it does not work. The error message is this:

Omeka has encountered an error

Zend_Mail_Transport_Exception

Unable to send mail.

exception ‘Zend_Mail_Transport_Exception’ with message 'Unable to send mail. ’ in /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Mail/Transport/Sendmail.php:137
Stack trace:
#0 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Mail.php(1201): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /var/www/msha.btk.ppke.hu/docroot/plugins/SimpleContactForm/controllers/IndexController.php(83): Zend_Mail->send()
#3 /var/www/msha.btk.ppke.hu/docroot/plugins/SimpleContactForm/controllers/IndexController.php(26): SimpleContactForm_IndexController->sendEmailNotification(‘zsalmasi@gmail…’, ‘Alm??si Zsolt’, ‘PLease’)
#4 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Controller/Action.php(516): SimpleContactForm_IndexController->indexAction()
#5 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘indexAction’)
#6 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#7 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#8 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#9 /var/www/msha.btk.ppke.hu/docroot/application/libraries/Omeka/Application.php(77): Zend_Application->run()
#10 /var/www/msha.btk.ppke.hu/docroot/index.php(23): Omeka_Application->run()

How can I fix the problem? This does not seem identical with the ones above. Thanks in advance!

Issues with the “Sendmail” type of email sending, which is the default, don’t really have much to do with Omeka.

Sendmail requires your server to be set up for sending email. If you have a host or IT, you’ll want to inquire with them about it. Otherwise, you can switch to the SMTP method of sending mail by using the application/config/config.ini file, and specify an external mail server to use to send your mail out.

1 Like

Thank you, I’ll contact the server administrator.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.