So, I've searched and searched, to no avail.
Google is hosting my domain's email. (Yes, it's some beta for domain email.)
Much like Windows Live Custom Domains beta.
Now, as we all know, Google is kind enough to let us use their POP mail servers.
So, I'm trying to use that POP access to use my domain email to send out registration information for gallery users. (Yes, I use google's supplied ports)
It doesn't work. It spews some errors.
Here's the settings that Google provides for us to access it's POP features, after enabling the email account to use POP:
Quote:
Incoming Mail (POP3) Server - requires SSL: pop.gmail.com
Use SSL: Yes
Port: 995
Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587
Account Name: your Gmail username (including '@gmail.com')
Email Address: your full Gmail email address (username@gmail.com)
Password: your Gmail password
But, gallery lets me use: Server, username, password, return-to addr.
Anyway, here's the error (and sometimes there's no error when I try sending a test email, it just returns a blank page.):
Quote:
Error (ERROR_UNKNOWN) : Could not send mail to
in modules\core\classes\helpers\MailHelper_simple.class at line 102 (GalleryCoreApi::error)
in modules\core\classes\GalleryCoreApi.class at line 2846 (MailHelper_simple::sendTemplatedEmail)
in modules\core\AdminCore.inc at line 246 (GalleryCoreApi::sendTemplatedEmail)
in main.php at line 199 (AdminCoreController::handleRequest)
in main.php at line 87
in main.php at line 80
file_exists(E:\Server\gallery\smarty\templates_c\%%3422551593)
is_dir(E:\Server\gallery\smarty\templates_c\%%3422551593)
file_exists(E:\Server\gallery\smarty\templates_c\%%3422551593)
is_writeable(E:\Server\gallery\smarty\templates_c\%%3422551593)
file_exists(E:\Server\gallery\smarty\templates_c\%%3422551593/v_9)
file_exists(C:\Program Files\Abyss Web
Server\htdocs\viewer\modules\core\classes\helpers/../../../..//modules/core/templates/local/EmailTest.tpl)
file_exists(C:\Program Files\Abyss Web
Server\htdocs\viewer\modules\core\classes\helpers/../../../..//modules/core/templates/EmailTest.tpl)
stat(C:\Program Files\Abyss Web
Server\htdocs\viewer\modules\core\classes\helpers/../../../..//modules/core/templates/EmailTest.tpl)
getParameter smtp.from for core plugin
file_exists(E:\Server\gallery\cache\module/core/0/0/0.inc)
file_exists(E:\Server\gallery\cache\module/core/0/0)
is_dir(E:\Server\gallery\cache\module/core/0/0)
file_exists(E:\Server\gallery\cache\module/core/0/0/0.inc)
rename(E:\Server\gallery\cache\module/core/0/0\0.i1CE.tmp,
E:\Server\gallery\cache\module/core/0/0/0.inc)
mail(linuxfever@hotmail.com, Gallery Email Test, This is a test email from
Gallery2, Content-Type: text/plain; charset="utf-8"
From:
)
file_exists(C:\Program Files\Abyss Web
Server\htdocs\viewer\modules\core\classes\helpers/../../../../config.php)
file_exists(C:\Program Files\Abyss Web
Server\htdocs\viewer\modules\core\classes\helpers/../../../../plugins/index.libs)
realpath(C:\Program Files\Abyss Web
Server\htdocs\viewer\modules\core\classes/../../../)
smtpmail error: Error (ERROR_PLATFORM_FAILURE) : Problem sending mail.
Server response: 530 5.7.0 Must issue a STARTTLS command first
q15sm431121qbqin lib\smtp\smtp.php at line 32 (GalleryCoreApi::error)
in lib\smtp\smtp.php at line 89
in modules\core\classes\GalleryPlatform.class at line 1052
in modules\core\classes\helpers\MailHelper_simple.class at
line 99 (GalleryPlatform::mail)
in modules\core\classes\GalleryCoreApi.class at line 2846
(MailHelper_simple::sendTemplatedEmail)
in modules\core\AdminCore.inc at line 246
(GalleryCoreApi::sendTemplatedEmail)
in main.php at line 199 (AdminCoreController::handleRequest)
in main.php at line 87
in main.php at line 80
From what I can see, and gather, Google requires the STARTTLS (SSL?) in this case. Or something like that? And ofcourse, Gallery doesn't have that.
Here's my question -> Can someone help me out? Please?
Quote:
Gallery version = 2.1.1 core 1.1.0.1
PHP version = 5.1.4 cgi-fcgi
Webserver = Abyss/2.3.0.5-X1-Win32 AbyssLib/2.3.0.5
Database = mysql 5.0.21-community-nt, lock.system=database
Toolkits = Exif, Thumbnail, Gd, ArchiveUpload
Acceleration = none, none
Operating system = Windows NT XEUS 5.1 build 2600
Default theme = matrix
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Posts: 11
I apologize if I come off as demanding, but since this is such a famous project, I'd expect to have a reply with minimal information to the least.
How come no one's even replying?
Posts: 12
Most if not all php scripts don't support smtp auth yet. I think there were a couple but it was extremely rare. I don't think there is even a single one that supports the smtp secure protocol either. So it may not be possible to do this via php. I did hit some php scripts using smtp auth so I will see if something works. I have a gmail account with pop enabled so I will work with that and see what I come up with.
EDIT: It is possible to code it using the XPertMailer pear class. Their address is http://www.xpertmailer.com/
Here is a description:
XPertMailer is a PHP class that you can use to send encoded MIME type e-mail messages (text, HTML, HTML embedded images, attachments) towards a localhost, client or relay SMTP servers with optional authorisation and TLS/SSL support. Cc and Bcc functionality are included.
Posts: 11
Thank you for replying shinji.
Unfortunately, I'm new to this and not a coder at all, lol.
So, I guess I'll have to wait for community support.
I'll be monitoring this thread closely for any progress you can make.
Thank you so much, once again.
Posts: 11
Any headway at all?
Posts: 1
I was able to get this to work by making a modification to the smtp.php file. Line 68 (in my version) I updated from:
list ($config['smtp.host'], $port) = array_merge(explode(':', $config['smtp.host']), array(25));
to:
list ($config['smtp.host'], $port) = array_merge(explode('^', $config['smtp.host']), array(25));
I know there is a better way to do this so you can still include the port normally using :<port>, but I just wanted it to work. Then in my smtp settings in gallery I used the following for the server: ssl://smtp.gmail.com^465
I'm now able to send e-mails via smtp in gallery. Hope this helps.....
Posts: 11
This is the error I get:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Abyss Web Server\htdocs\viewer\lib\smtp\smtp.php on line 25
PS: Thanks for trying.
Posts: 19
I used the following for the server: ssl://smtp.gmail.com^465
in smtp.php??
OR site admin > General > Email??
Posts: 1
ssl://smtp.gmail.com^465
goes in the "Server" box in:
admin > General > Email
By the way, I made the above modification on Gallery 2.2.2 and it works fine for me.
I tried this and I get.
Error (ERROR_UNKNOWN) : Could not send mail to (myotheremail)@gmail.com
* 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
I changed the line in smtp.php but still get errors.
bump anyone?
Posts: 44
This mod works fine here!
Posts: 3
im bumping this. Having the same problem with firefox mail and the mod above gives me the follwoing error:
Error (ERROR_UNKNOWN) : Could not send mail to
in C:\...\Gallery\modules\core\classes\helpers\MailHelper_simple.class at line 93 (GalleryCoreApi::error)
in C:\...\Gallery\modules\core\classes\GalleryCoreApi.class at line 2734 (MailHelper_simple::sendTemplatedEmail)
in C:\...\Gallery\modules\core\AdminCore.inc at line 179 (GalleryCoreApi::sendTemplatedEmail)
in C:\...\Gallery\main.php at line 231 (AdminCoreController::handleRequest)
in C:\...\Gallery\main.php at line 94
in C:\...\Gallery\main.php at line 83
file_exists(E:\Pictures\smarty\templates_c\%%3047035672)
is_dir(E:\Pictures\smarty\templates_c\%%3047035672)
file_exists(E:\Pictures\smarty\templates_c\%%3047035672)
is_writeable(E:\Pictures\smarty\templates_c\%%3047035672)
file_exists(E:\Pictures\smarty\templates_c\%%3047035672/v_12)
file_exists(C:\...\Gallery//modules/core/templates/local/EmailTest.tpl)
file_exists(C:\D...\Gallery//modules/core/templates/EmailTest.tpl)
stat(C:\...\Gallery//modules/core/templates/EmailTest.tpl)
getParameter smtp.from for core plugin
file_exists(E:\Pictures\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(E:\Pictures\cache\module/core/0/0)
is_dir(E:\Pictures\cache\module/core/0/0)
file_exists(E:\Pictures\cache\module/core/0/0)
is_dir(E:\Pictures\cache\module/core/0/0)
file_exists(E:\Pictures\cache\module/core/0/0/0.inc)
rename(E:\Pictures\cache\module\core\0\0\0.i823.tmp,
E:\Pictures\cache\module/core/0/0/0.inc)
mail(otheremal@gmail.com, Gallery Email Test, This is a test email
from Gallery2, Date: Thu, 24 Jan 2008 19:02:07 -0500
From:
Content-Type: text/plain; charset="utf-8"
)
realpath(C:\...\Gallery\modules\core\classes/../../../)
realpath(C:\...\Gallery/)
smtpmail error: Error (ERROR_PLATFORM_FAILURE) : Could not connect to smtp
host : 125238808 : Unable to find the socket transport "ssl" -
did you forget to enable it when you configured PHP? in C:\...\Gallery\lib\smtp\smtp.php at
line 71 (GalleryCoreApi::error)
in C:\...\Gallery\modules\core\classes\GalleryPlatform.class at line 968
in C:\...\Gallery\modules\core\classes\helpers\MailHelper_simple.class at
line 90 (GalleryPlatform::mail)
in C:\...\Gallery\modules\core\classes\GalleryCoreApi.class at line 2734
(MailHelper_simple::sendTemplatedEmail)
in C:\...\Gallery\modules\core\AdminCore.inc at line 179
(GalleryCoreApi::sendTemplatedEmail)
in C:\...\Gallery\main.php at line 231
(AdminCoreController::handleRequest)
in C:\...\Gallery\main.php at line 94
in C:\...\Gallery\main.php at line 83
Posts: 3
whoops...double post, sorry...laggy browser
Posts: 2
The mod did not work under 2.1.2. I upgraded to 2.2.4 and the mod works like a charm. THANKS a bunch!!
Posts: 4
Have you made any progress on resolving this ?
Steve
Posts: 1
You can use PHP's parse_url() function for a bit of a cleaner fix.
Replace line 68 in smtp.php with the following:
$url_info = parse_url($config['smtp.host']);
$config['smtp.host'] = $url_info['scheme'].'://'.$url_info['host'];
$port = $url_info['port'];
Posts: 11
I'm trying to get this to work using gmail as well. I put "ssl://smtp.gmail.com^465" in for server, "dmikester1@gmail.com" in for username, [my password] in for my password, and "dmikester1@gmail.com" in for SMTP from email address and the test email address. I also replaced line 68 with those three lines above in smtp.php.
Getting this error:
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(/.../smarty/templates_c/%%152765688)
is_dir(/home/.../smarty/templates_c/%%152765688)
file_exists(/.../smarty/templates_c/%%152765688)
is_writeable(/.../smarty/templates_c/%%152765688)
file_exists(/.../smarty/templates_c/%%152765688/v_12)
file_exists(/.../Gallery//modules/core/templates/local/EmailTest.tpl)
file_exists(/.../Gallery//modules/core/templates/EmailTest.tpl)
stat(/.../Gallery//modules/core/templates/EmailTest.tpl)
getParameter smtp.from for core plugin
file_exists(/.../Photos/cache/module/core/0/0/0.inc)
(mysqlt):
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(/.../Photos/cache/module/core/0/0)
is_dir(/.../Photos/cache/module/core/0/0)
file_exists(/.../Photos/cache/module/core/0/0)
is_dir(/.../Photos/cache/module/core/0/0)
rename(/.../Photos/cache/module/core/0/0/0.incOHWZSh,
/home/.../Photos/cache/module/core/0/0/0.inc)
mail(dmikester1@gmail.com, Gallery Email Test, This is a test email from
Gallery2, Date: Thu, 06 Nov 2008 21:34:08 -0800
From:
Content-Type: text/plain; charset="utf-8"
)
realpath(/.../Gallery/modules/core/classes/../../../)
realpath(/.../Gallery/)
smtpmail error: Error (ERROR_PLATFORM_FAILURE) : Could not connect to smtp
host : 2 : No such file or directory in lib/smtp/smtp.php at
line 74 (gallerycoreapi::error)
in modules/core/classes/GalleryPlatform.class at line 968
in modules/core/classes/helpers/MailHelper_simple.class at
line 90 (unixplatform::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: 3
Bump!
Having exactly the same problem, and with the latest version of gallery2 (2.3) Has anyone found a solution to this?
Using ssl://smtp.gmail.com:465 (or ^465, with appropriate changes in smtp.php), and proper login details, it gives me the same error as everyone else.
Thanks,
Posts: 1
I used the approach suggested by changing line 68 in smtp.php and using "ssl://smtp.gmail.com^465" in the "Server" line in the "General" page in "Site Admin".
This worked for me. My site is sending out e-mails perfectly. This after I was getting the "STARTTLS" errors when trying to use port 587.
Gallery version 2.3 under Ubuntu 8.10
Posts: 1
The errors above are PHP/SSL configuration errors on your webserver.
In the text you posted above the following string tells all:
Sadly I don't know how to help you fix that. Good Luck!
Posts: 1
To fix this edit your php.ini file and change
;extension=php_openssl.dllto this:
extension=php_openssl.dllThis worked for me (using XAMPP on a Windows Vista machine); combined with the smtp.php "^" hack, I can now send e-mails through GMail.