From: Date: July 2 2009 10:07pm Subject: RE: Problem sending mails from Eventum List-Archive: http://lists.mysql.com/eventum-users/5592 Message-Id: <293B01F5AA3CB749822C745BBA3463493F6B5B@RTDC2.Realtech.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have had the same problem under some circumstances. When sending a = mail directly to an issue instead of replying to a mail sent from the = system. After much pulling of hair I traced the problem to the = Auth::getUserID function in the class.auth.php file. It seems under some circumstances Eventum is trying to validate the user = from a Session cookie. In the example above when we are receiving a = mail directly this cookie wont ever exist. I "fixed" this by adding a check for a null value and hard coding my = Admin's userid into the function. Not really what I want but works. =20 I've attached my code below: function getUserID() { $info =3D Auth::getCookieInfo(APP_COOKIE); if (empty($info)) { return ''; } else { // DA - Handle missing cookies if ($info["email"] =3D=3D null){ // DA - Enter the Admin userID below (mine was userid 3)=09 return 3;=09 } else { return User::getUserIDByEmail($info["email"]); } } } -----Original Message----- From: Adrian Chapela [mailto:achapela.rexistros@stripped]=20 Sent: Thursday, 2 July 2009 11:25 p.m. To: Gopalakrishnan.Krithivasan@stripped Cc: eventum-users@stripped Subject: Re: Problem sending mails from Eventum I can't find auth::userid() on any file on my Eventum Installation. I am using Eventum 2.2. Gopalakrishnan.Krithivasan@stripped escribi=F3: > Hi, > > Please try executing background script by disabling Email routing = interface. > > Userid what I have mentioned is for sender. > > Eventum script use auth::userid() to get userid of sender for sending = mails. > > We can replace that line with hardcoded userid like -userid mapped to = Admin@stripped etc. > > If u are not getting error then try enabling with Email Routing = Interface and check for the errors. > > > Rgs > K.Gopalakrishnan > > -----Original Message----- > From: ext Adrian Chapela [mailto:achapela.rexistros@stripped] > Sent: Thursday, July 02, 2009 4:25 PM > To: Krithivasan Gopalakrishnan (Nokia-D-MSW/Bangalore);=20 > eventum-users@stripped > Subject: Re: Problem sending mails from Eventum > > Hello, > > I have enabled Email Routing Interface and I am sending in background = too. I have this line on my crontab: /usr/bin/php5 = /var/www/eventum/misc/process_mail_queue.php and every 3 minutes with = parameter --fix-lock. > > If I disabled the Email Routing Interface, the mails are not sending. = I am very confused now, because I think that the process_mail_queue.php = and the Email Routing Interface are complementary. > > I don't understand your answer "u can set userid hardcoded for mails. = ".=20 > What are you meaning with userid ? Are you talking about the sender = userid ? > > Thank you > > Gopalakrishnan.Krithivasan@stripped escribi=F3: > =20 >> Hi, >> >> Two cases u will get this error. >> >> If u try to send mail with background script where it can't get user = id which is mandatory for sending mail. >> >> If u have enabled Email Routing Interface in general setup also u = will get this error by sending mail to localhost. >> >> To fix issue with background script,u can set userid hardcoded for = mails. >> >> Please get back to me if u face any issue after doing modifications. >> >> >> Rgs >> K.Gopalakrishnan >> >> -----Original Message----- >> From: ext Adrian Chapela [mailto:achapela.rexistros@stripped] >> Sent: Thursday, July 02, 2009 3:55 PM >> To: eventum-users@stripped >> Subject: Problem sending mails from Eventum >> >> I have eventum with update notifications. Sometimes I have problem = sending mails but I don't know why. The error is : >> >> Hello, >> >> An error was found on line '250' of script = '/var/www/eventum/include/class.mail_queue.php'. >> >> The error message passed to us was: >> >> 'Failed to add recipient: @localhost [SMTP: Invalid response code = received from server (code: 501, response: <@localhost>: no local = part)]' >> >> A more detailed error message follows: >> >> '' >> >> A backtrace is available: >> >> APP_INC_PATH/class.mail_queue.php:193 >> Mail_Queue::_sendEmail((string )'=3D?UTF-8?Q??=3D <>', (string >> )'MIME-Version: 1.0 >> Message-ID: >> >> Any idea ? >> >> >> -- >> Eventum Users Mailing List >> For list archives: http://lists.mysql.com/eventum-users >> To unsubscribe: = http://lists.mysql.com/eventum-users?unsub=3DGopalakrishnan.Krithivasan@n= okia.com >> >> >> =20 >> =20 > > > =20 -- Eventum Users Mailing List For list archives: http://lists.mysql.com/eventum-users To unsubscribe: = http://lists.mysql.com/eventum-users?unsub=3Ddavid.anderson@stripped= z