can anyone tell me how to set up email for gallery3 please I've installed the register modules but just get send message errors when I use it.
Can anyone let me know if I have to alter a config file within gallery3 or modify the php.ini or some other file please
Posts: 7994
In general, the mail config file is modules/gallery/config/sendmail.php
That probably won't help you though if you're having an underlying error. What's in your Apache error logs? What errors do you get? More details please!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 21
sorry for the delay, heres what happens
you try to register and click the register button and nothing happens for the user registering, you go into the back end and see there is a user waiting to be confirmed you click activate and get errors
will check the gallery/apache logs and get back to you
Posts: 21
the gallery logs only feature the following
and the apache log even less
the only worrying thing I see is the first line of the gallery log
the sendmail.php simply contains the following 4 lines entires other than the headers and non active lines
Posts: 16504
You're running Gallery on Windows. First, Windows isn't a supported platform. Second, do you have an smtp server installed on the server?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 21
yep sad to say it is windoz, and yes there is a hmail server sat on the box itself answering on all the usual ports
Posts: 16504
Not much time we can spend on trying to trouble shoot this being a windows box. First thing I'd check is if you can send email from PHP from any app.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 204
Zeb.... I'm a windows dude.... Gimme some time.. I just got back from dirka dirka gihad.... I'll look into this shortly.
Posts: 204
ZEB....
Typically you don't need any sendmail installed if you are using IIS. You don't even need the SMTP server installed. But this is assuming you are using IIS. Apache is a different story.
Have you tried sendmail from a command line?
Use this: http://www.w3schools.com/PHP/php_mail.asp to make a php file and test it. I'm guessing either the ISP or Server is the issue...
If you are using gallery on a WINDOWS server, honestly, IIS is superior IF you are using Windows Server 2008/R2.
Can you provide specs?
32/64bit? / Windows version etc. Thanks!
Posts: 21
thanks for the info and sorry for the delay getting stuff back to you, back at work today so have some time.
Windows 2003 server 32bit Apache/2.0.58 (Win32) PHP/5.2.9-1
have just created the script to send the mail and it works fine to other address on the boxes email server and also to external ones.
Just monitored the logs of the mail server as the send was supposed to take place when setting up an account and found the following all the accepts are done until I get a line stating
SENT: 554 Rejected - Message containing bare LF's.
so it looks like the email server on the box is rejecting the message because of \n have altered the mail config file to \r\n and still no luck
Posts: 204
I'm lost here. Is the mail server a different box other then where the gallery box is with 2003/Apache? I wanna make sure I have everything accurate.
----------
554 Rejected - Message containing bare LF's.
According to the SMTP specification, every line in an email message should be separated by the ASCII-codes 13 and 10 - carriage return (CR) and line feed (LF). Some spammers and incorrectly working software sends messages which are not correctly formatted. Use this setting to reject these messages. Please note that legitimate email might have incorrectly formatted line endings, if the sending software contains bugs.
If you who are a developer receive this problem, confirm that each line of your email message (both header and body) is ended with a carriage return and a line feed, and not just a line feed. How to do this depends on what programming language you are working with. In .C++, C#, and PHP add \r\n to the end of every line. In Visual Basic, add vbNewLine or vbCRLF.
On Windows, the default line separator is CRLF. On Linux and UNIX, the default separator is only LF. However, when sending an email message from a Linux/UNIX system, CRLF must always be used. Some email servers under Linux (such as Postfix) automatically replaces LF with CRLF. Hence, setting the line separator in the email to CRLF will cause it to be changed to CRCRLF.
Posts: 21
The mail server is sat on the same box as the gallery install, it's a hmailserver, the error when searched for on the hmail server site stated the bit about /r/n which is also reported in the error shown above, I added the /r to the php script for the mail config and no difference
Posts: 204
So the hmailserver is rejecting gallery sending, or from that script I had you test out, or both....
To me, you don't even need that program. You should just be using PHP sendmail.
And is this a computer your personally own at your house, or at a co-located/hosted place?
Posts: 21
The small script works perfectly and sends to both external address ie ones not on the same server and also to internal ones, the server is mine I also host other sites on it joomla 1.5 mainly and few others as well which can all send emails
Posts: 204
Ok. So then if that's the case, it looks like how gallery sends mail is not sending to hmail correctly, or hmail is having issues with gallery......
I will test the notifications on 2 of my 2008 boxes later today and let you know if I have issues. I haven't fully tested it because it doesn't import the comments and ratings yet, so G3 is useless to me until those sub features are installed....
I'll get back to you.
Posts: 21
Thank you so much for your help
Posts: 21
any news yet?
Posts: 204
Crap.... I was lazy. LOL. I'll boot up a VMware session, install it and get back to you...Gimme 20 mins.
Posts: 204
#13 {main}
2010-08-19 00:36:00 -07:00 --- error: @todo notification_event::item_updated() failed
2010-08-19 00:36:00 -07:00 --- error: @todo SEND_MAIL_FAILED
#0 E:\XXXXXX\modules\notification\helpers\notification.php(218): Sendmail_Core->send()
#1 E:\XXXXXX\modules\notification\helpers\notification.php(110): notification::_notify(Array, Object(Item_Model), '<html>? <head>...', Object(SafeString))
#2 E:\XXXXXX\modules\notification\helpers\notification_event.php(26): notification::send_item_updated(Object(Item_Model), Object(Item_Model))
#3 [internal function]: notification_event_Core::item_updated(Object(Item_Model), Object(Item_Model))
#4 E:\XXXXXX\modules\gallery\helpers\module.php(374): call_user_func_array(Array, Array)
Seems it's either not using PHP Sendmail or something. Because I can send mail out. So I'm saying it's the actual php file sending the notifications. I think it needs to be configurable... As I personally don't see an area to adjust the settings. Once I catch some sleep I'll look into it more....
We need one of the developers to tell us how it's handled and sent and where/what we can mess with. I'll start mucking with some php files. Thank god for VMware. ;)
=================================
After looking at \modules\notification\helpers\notification.php it's not windows compatible to me. Is it calling functions?
In G2, I know if you went to Admin Options > General Settings > Email you could configure it. WITH THIS, you can't.... This is a developer side issue.
By default, even in G2, it can't send mail. IF YOU CAN SPECIFY A SMTP SERVER IT DOES SEND
To
date Thu, Aug 19, 2010 at 3:52 AM
subject Gallery Email Test
mailed-by qmta04.westchester.pa.mail.comcast.net
hide details 3:52 AM (0 minutes ago)
This is a test email from Gallery2
Posts: 16504
In G2 there are functions specifically written for sending via SMTP and specifying all that stuff. There is currently nothing in G3 for that. It's using php's native mail function. See modules/gallery/libraries/Sendmail.php (at the bottom is where the message is sent)
Looks like this is using SMTP and it looks like it should work on Windows http://php.net/manual/en/function.mail.php So I believe as long as you have an SMTP server installed it should work.
I wonder if it's not sending because of some small formatting thing? I've only glanced over all of the discussion here: http://php.net/manual/en/function.mail.php
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 21
I think it is down to some sime formatting issue the mail server can be seen to accept the connection but then rejects the message stating a bare LF error
Posts: 204
NV is correct. For windows we just need to be able to "Specify" a smptp server, "able to set a login/password" and able to send a "test email"
If that's added, I think it will make the cross platform issue disappear.
Posts: 204
It works ONLY if I specify a host for the smtp server.
So it's a bug/feature missing that was IN G2 and NOT G3...
You shouldn't need ANY SMTP MAILSERVER installed at all as your host (comcast) , (hostgator) will provide with with this. Thus NOTHING on the server needs setup. So if we could do what a I asked above...
Allow the end user to:
1. Specify a smtp mailserver.
2. specify a login/password (if needed)
3. Send a test email out
I truly feel this issue would go buh bye......
Let me know. I will guinea pig this. Write me a custom php etc and I'll try them..... Or TELL me how to troubleshoot it specifically if you guys have a special way of doing that...I'm off for the weekend..... So don't expect any support until Monday, unless I get bored. ;)
Cheers.
Posts: 7994
Please file a ticket for this feature.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 204
Help me out here.... It's the weekend, Captain Morgan + my grill = going and I have friends here...
Point me in the right direction and I'll do it. Thanks!
Posts: 16504
Ranger187,
Right here: http://sourceforge.net/apps/trac/gallery You may need to register, it's free. Just login and click on New Ticket
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 204
Niv.... Thanks dude.