Hello eveyone,
I've been running Gallery2 for a few weeks.. I am new, I seem to get the following error when sending the test e-mail, I was wondering if anyone could give me a hand, basically I am using my Gmail to send out, nothing fancy.. plain and simple..
Error bellow..
Error (ERROR_UNKNOWN) : Could not send mail to
in modules/core/classes/helpers/MailHelper_simple.class at line 93 (GalleryCoreApi::error)
in modules/core/classes/GalleryCoreApi.class at line 2734 (MailHelper_simple::sendTemplatedEmail)
in modules/core/AdminCore.inc at line 179 (GalleryCoreApi::sendTemplatedEmail)
in main.php at line 231 (AdminCoreController::handleRequest)
in main.php at line 94
in main.php at line 83
file_exists(/var/lib/gallery2/g2data/smarty/templates_c/%%3723729847)
is_dir(/var/lib/gallery2/g2data/smarty/templates_c/%%3723729847)
file_exists(/var/lib/gallery2/g2data/smarty/templates_c/%%3723729847)
is_writeable(/var/lib/gallery2/g2data/smarty/templates_c/%%3723729847)
file_exists(/var/lib/gallery2/g2data/smarty/templates_c/%%3723729847/v_12)
file_exists(/usr/share/gallery2//modules/core/templates/local/EmailTest.tpl)
file_exists(/usr/share/gallery2//modules/core/templates/local/EmailTest.tpl)
file_exists(/usr/share/gallery2//modules/core/templates/EmailTest.tpl)
stat(/usr/share/gallery2//modules/core/templates/EmailTest.tpl)
getParameter smtp.from for core plugin
file_exists(/var/lib/gallery2/g2data/cache/module/core/0/0/0.inc)
--------------------------------------------------------------------------------
(mysqli):
SELECT
g2_PluginParameterMap.g_itemId,
g2_PluginParameterMap.g_parameterName,
g2_PluginParameterMap.g_parameterValue
FROM
g2_PluginParameterMap
WHERE
g2_PluginParameterMap.g_pluginType = 'module'
AND
g2_PluginParameterMap.g_pluginId = 'core'
AND
g2_PluginParameterMap.g_itemId = 0
--------------------------------------------------------------------------------
file_exists(/var/lib/gallery2/g2data/cache/module/core/0/0)
is_dir(/var/lib/gallery2/g2data/cache/module/core/0/0)
file_exists(/var/lib/gallery2/g2data/cache/module/core/0/0)
is_dir(/var/lib/gallery2/g2data/cache/module/core/0/0)
rename(/var/lib/gallery2/g2data/cache/module/core/0/0/0.incTq8PlV,
/var/lib/gallery2/g2data/cache/module/core/0/0/0.inc)
mail(nelson.conceicao@gmail.com, Gallery Email Test, This is a test email
from Gallery2, Date: Mon, 02 Feb 2009 01:03:06 -0500
From:
Content-Type: text/plain; charset="utf-8"
)
realpath(/usr/share/gallery2/modules/core/classes/../../../)
realpath(/usr/share/gallery2/)
smtpmail error: Error (ERROR_PLATFORM_FAILURE) : Couldn't get mail server
response code in lib/smtp/smtp.php at line 27
(GalleryCoreApi::error)
in lib/smtp/smtp.php at line 75
in modules/core/classes/GalleryPlatform.class at line 968
in modules/core/classes/helpers/MailHelper_simple.class at
line 90 (GalleryPlatform::mail)
in modules/core/classes/GalleryCoreApi.class at line 2734
(MailHelper_simple::sendTemplatedEmail)
in modules/core/AdminCore.inc at line 179
(GalleryCoreApi::sendTemplatedEmail)
in main.php at line 231 (AdminCoreController::handleRequest)
in main.php at line 94
in main.php at line 83
Posts: 4338
Almost certainly your SMTP mail configuration is wrong.
Have you manually set the server/username on the Admin main page? If not then the problem will be with your php mail configuration. Contact your host to check it, or else configure your own SMTP mailserver on the main admin page.
If you have set the server/username manually then it's either wrong or that server won't accept mail from your webserver.
Posts: 5
I've gone to the admin page
smtp.gmail.com
tried
smtp.gmail.com:465
username:
username: name
I've tried them all.. above
port is open on my router too..
Posts: 4338
try using "tls://smtp.gmail.com:465" as the hostname.
You also need to have openSSL support compiled into your php for it to work.
EDIT again:
actually I suspect you're stuffed. fsockopen(...) specifies that for tls, prefix the hostname with tls:// ... as above. However, the lib/smtp.php library that G2 uses for sending SMTP mail has the following:
list ($config['smtp.host'], $port) = array_merge(explode(':', $config['smtp.host']), array(25));Which looks to me to be a cute way of appending ":25" as a default port if one isn't included in the $config['smtp.host'] setting. However, I think that will break if the host part already has a : in it.
Posts: 5
I tried now "tls://smtp.gmail.com:465 and nada.
port 25 is blocked "only my provider can use it"
Posts: 4338
You could try editing lib/smtp.php line 68 to read
list ($config['smtp.host'], $port) = array_merge(explode('|', $config['smtp.host']), array(25));And try tls://smtp.gmail.com|465 as your hostname. I haven't tried it though.
Posts: 177
just found this post. thanks once again Alec, the post above worked for me.
Posts: 64
Hi Nivekiam,
If i send a test email with nothing filled out in the SMTP settings, I get the following error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,
and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
I do receive the email despite the error page. The email comes from: "anonymous@pair.com"
That is with the hack in the smtp.php file. I'm pretty sure I got the same error without the hack. I'll try again without the hack. and report back
Neil Girardi
www.CenterfoldNextDoor.com
Posts: 64
Just tried it without the hack in the smtp.php file. Same exact thing. I'm redirected to a white page that says:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,
and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Neil Girardi
www.CenterfoldNextDoor.com
Posts: 4338
(I don't think Nivekiam has posted in this thread, so he may not see your post...)
The hack is only needed for email over TLS - do you need that or not? You haven't said anywhere.
And when you look in the server error log, what do you find?
Posts: 64
I'm on the phone with a tech from Pair. I made him an admin account so that he could log in and recreate the issue by attempting to send a test mail. He got the same error. When he checked the Apache server logs he also found this error:
www.centerfoldnextdoor.com [Mon Sep 28 16:36:54 2009] [error] [client
216.92.130.47] malformed header from script. Bad header=\tLC_ALL =
(unset),: php-cgiwrap, referer:
http://209.68.33.4/gallery2/main.php?g2_view=core.SiteAdmin&g2_return=%2Fgallery2%2Fmain.php%3Fg2_GALLERYSID%3D1e2e69219cb85014a893c81a0e953cb8
Does this shed any light?
Thanks!
Neil Girardi
www.CenterfoldNextDoor.com