Harald Ponce de Leon Posted January 4, 2003 Share Posted January 4, 2003 NOTE: The osc_mail2db.php script has been updated which fixed 2 errors. It can be downloaded in the Contribution package-set at the following link. http://www.oscommerce.com/community/contributions,859 A helpdesk add-on for osCommerce that has the capability to keep track of communication via emails. The thread of communication is stored in the database where a ticket number is assigned to a thread. It is possible to create template responses which can be used when replying to a ticket entry. Departments are setup to handle different areas of communication (help, sales, information, etc). [This is a separate work to other helpdesk feature contributions currently available] Quote , osCommerce Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted January 4, 2003 Author Share Posted January 4, 2003 Thanks to Mattice for helping out in testing the contribution .. in the weeee hours of the morning (4:30am->6:00am :shock:) Quote , osCommerce Link to comment Share on other sites More sharing options...
networkdad Posted January 4, 2003 Share Posted January 4, 2003 Very, very, very cool contribution! Hopefully someone can give me a hand in piping the info over to the database ?? I'm using an ensim control panel (redhat linux). How can i get this to work properly and feed the info to the database ? Thx! ~Jason Quote Link to comment Share on other sites More sharing options...
loxly Posted January 4, 2003 Share Posted January 4, 2003 Very, very, very cool contribution! Hopefully someone can give me a hand in piping the info over to the database ?? I'm using an ensim control panel (redhat linux). How can i get this to work properly and feed the info to the database ? Thx! ~Jason You should have a link in ensim to MySQL database under services. Click on the pencil icon (for edit), then there should come another page with a link to MySQL where you can edit the database. Debbie Quote [no external urls in signatures please, kthanks] Link to comment Share on other sites More sharing options...
networkdad Posted January 4, 2003 Share Posted January 4, 2003 Perhaps i mis-worded what i'm trying to do. I've already got the contrib working, and done the small import into MySQL. What i'd like to do is get the osc_mail2db.php to work and pipe the emails into the database. I'm unsure of what exactly needs configured in that file for it to work for me. Quote Link to comment Share on other sites More sharing options...
loxly Posted January 4, 2003 Share Posted January 4, 2003 Perhaps i mis-worded what i'm trying to do. I've already got the contrib working, and done the small import into MySQL. What i'd like to do is get the osc_mail2db.php to work and pipe the emails into the database. I'm unsure of what exactly needs configured in that file for it to work for me. You are correct, I misunderstood, sorry! And I thought I fianlly helped someone..... :) Debbie Quote [no external urls in signatures please, kthanks] Link to comment Share on other sites More sharing options...
Snowman Posted January 4, 2003 Share Posted January 4, 2003 Well done Harald...just the thing i have been waiting for :D Now i can push ahead with a big top secret mod im working on :wink: Quote Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 4, 2003 Share Posted January 4, 2003 I am actually having the same problem as network dad. I installed the files and the sql updates. But I'm nto quiet sure how to configure the osc_mail2db.php, or more so the piping of the email to that script. My site is on a unix server running apache. whats q mail? Proc mail.... Should someone typically be able to do this themselves or have to contact the hosting company to set this up? I'll search the web for answers....hopefully I'll find them and let you know too Networkdad... Adios for now.. Quote Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 4, 2003 Share Posted January 4, 2003 Ok..I havent gotten it working so far .. but...to pipe the email contents to the script ..you need to locate your .procmailrc file - its in your www-mail folder..or something like that.. Edit that file using "vi .procmailrc" and insert the value specified in the install file under the email account which you wish to forward content tothe script.. However..I have that done...and its not working!!! I am not quiet sure about this line : :0 * (^To:|^CC:|^Cc:) .*sales@server.com "|/path/to/php -q /path/to/osc_mail2db.php config=/path/to/admin/includes/configure.php" Do the quotes have to be there? what is "/path/to/php " ?? Ihave set it as my root path to php.. and I have filled out the other path properly..and its still not working.. Any common problems? Anyone!?? Quote Link to comment Share on other sites More sharing options...
networkdad Posted January 5, 2003 Share Posted January 5, 2003 mark - thanks for the tip, that'll get me going. I'll post if im successfull here - i may have to get my host involved to help though. I have limited ssh access... Quote Link to comment Share on other sites More sharing options...
networkdad Posted January 5, 2003 Share Posted January 5, 2003 I had to install procmail on my host, but this still isnt working *yet*. I'm guessing the format in .procmailrc will look like this: :0 * (^To:|^CC:|^Cc:) .*cs@pcloop.net |/var/www/html -q /var/www/html/osc_mail2db.php config=/var/www/html/osadmin/includes/configure.php In the procmail tarball, there were a few examples to look at. Does anyone else have an idea on how to get this working ??? Quote Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 5, 2003 Share Posted January 5, 2003 I"m surprised you had to instal procmail ....usually there is one already there.... but in either case.. :0 * (^To:|^CC:|^Cc:) .*cs@pcloop.net |/var/www/html -q /var/www/html/osc_mail2db.php config=/var/www/html/osadmin/includes/configure.php /var/www/html should point to your php libs. i.e. /user/bin/php/ and the rest is self explanotary... The script works...... I tested it using HPDL' 's comments... I just havent got the email pipeing to work..my hosting company is helping me with it... I'll let you know too.. Mark Quote Link to comment Share on other sites More sharing options...
CC Posted January 5, 2003 Share Posted January 5, 2003 Hmmmm.. this is looking like a common problem. It seems that Harald is giving us great mods, but ones that are harder to install thatn usual. I am hoping Harald is gonna read this and reply to answer the fundamentals of whether this is something we have to get the host involved in, or is it a user based install? The install all goes fine until we hit this mark, where we have to get the incoming mail to the database. Bit of a problem really, as this renders the whole thing useless without it! Harald, HELP DUDE! Where's Mattice when you need him? :wink: He has tested this, so he should be able to assist too. CC. Quote Link to comment Share on other sites More sharing options...
networkdad Posted January 5, 2003 Share Posted January 5, 2003 I most definently have to get my host involved - i have limited ssh access, and cant modify the alias file as necessary to make this work. Quote Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 5, 2003 Share Posted January 5, 2003 I am not sure about getting your host involved.. a mail alias..is just adding an email address..thats all..you should be able to do that using your control panel....(most hosts) then you have to edit that procmailrc file...which is also in your user directory under www-mail or something like that.. and Yes..this is a common problem...the damn pipe isnt working..but I think its worth all our efforts.....for sure.. Quote Link to comment Share on other sites More sharing options...
CC Posted January 5, 2003 Share Posted January 5, 2003 Oh too true! This is a very good hack. Now what if the host uses sendmail? You keep mentioning procmailrc, but that is just one example isnt it? From my experience with hosts, which is fairly limited, I thought most mail was done by sendmail... I could be wrong. I have PM'd Harald, cos I think we sure do need his input! I have done all I can do, and the only thing it doesnt do now is insert the message that was sent in by the user. So you could say a success to some extent, lets just get the email - database sorted and this will be very good! CC. Quote Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 5, 2003 Share Posted January 5, 2003 You are right...procmail is only for one host..but what if they use different methods as you said.. I'm not the greatest hosting expert either to be honest..in fact I'm just a student who picked up php vs. java simply becuase of osCommerce !!! I'm still learning--- I have a lot to learn..I know! and yes...a success to some extent.. the fist is hooked ..but still in the water.... now we just have to get it out and bbq the sucker up!!! bbq salmon anyone??! lol Mark Quote Link to comment Share on other sites More sharing options...
networkdad Posted January 5, 2003 Share Posted January 5, 2003 I love fresh salmon... Anyways..-My host uses sendmail. I use an ensim cp to add my aliases, but it wont accept the path that i need to feed it to, hence the need to get my host to add an entry into my aliases file. I'd do it myself, but don't have access to files marked as 'root' - such as aliases. Sucks, cause i have to open a support ticket to get it done. :( Quote Link to comment Share on other sites More sharing options...
CC Posted January 5, 2003 Share Posted January 5, 2003 So are you saying that to add an alias, all you are actually doing is creating a new email address? So in my SiteControl panel, I add my@email.com and that is in effect a new alias added? I dont understand any of this email hosting claptrap. I only have my server at home for web testing, so no email is needed. If that is all that is needed for the alias part, then I should have no problem. But what should the rest be set to? And what about this: The mail aliases file may exist in /etc/mail/aliases - when it has beenmodified the linux command "newaliases" needs to be executed. How would we do this without admin access, which none of us will have on a paid hosts server. CC. Quote Link to comment Share on other sites More sharing options...
Rigo Posted January 5, 2003 Share Posted January 5, 2003 My server works with sendmail, and I do not understand to write where I must and where the file osc_mail2db.php must. Thus assume do I times it in the Web to be attainable must. But into which file or where I must write: |/var/www/html q/var/www/html/osc_mail2db.php config=/var/www/html/osadmin/includes/configure.php I do not understand it!!!! Sorry for my Bad English ! Quote Link to comment Share on other sites More sharing options...
dreamscape Posted January 5, 2003 Share Posted January 5, 2003 I too have sendmail on the server my site is on... I contacted the server admin about setting up aliases, and he said he'd have to find out what the file name was to add the alias line too and get back to me. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
CC Posted January 5, 2003 Share Posted January 5, 2003 Nice one dreamscape. Could you report back what they say please? I am waiting for my host to come back and offer info on this, but i could be in for a wait! So let me know what they say on the file for you and I will most likely try the same with my host. Heck, I cant do any worse testing it! :wink: CC. P.S. HAAAAAARALD WHERE ARE YOOOOOOU?! :D Quote Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted January 5, 2003 Author Share Posted January 5, 2003 There is a reason why little documentation was provided with the contribution in regard to accepting incoming mails - this is very server specific and will be impossible to cover all areas. That is why when people have this working they should report back on the steps they made not only to help others out, but to also put some documentation together. I've put my bit in with the Sendmail example - that is all I did and it works for me. I will mention three types of servers: 1) Localhost (Linux. Windows probably needs a third party application). 2) Shared Server (little control over the server) 3) Dedicated Server (some control over the server) 1) It's more than likely you have no idea what to do otherwise you would not be reading up to this page on this thread :D (smile, sooner or later you will get it working) The most important thing to do is to get mails working with your localhost server. I have Gentoo Linux installed, the appropriate documentation for this can be found here: http://www.gentoo.org/doc/en/desktop.xml#doc_chap6 If your server documentation is still alien to you, the only suggestion I have is to test this on the shared/dedicated server and let the server administrator take care of it for you. 2) Ask your server administrator! Tell them you need a mail alias entry to parse a script - provide the examples given in the contribution installation text. If your server administrator does not know or has to do research on it, I'd suggest to move to another server hosting company. Hey, this is e-commerce, it should be taken seriously - your server administrator should have the know-how for their own servers! 3) A combination of 1) and 2). ## I hope that helps somewhat - I am not a unix mail guru so I cannot provide more tips. ## The contribution will also work without a mail alias entry, but then incoming emails cannot be tracked and stored in the database. I think the Contact Us page provided needs to be updated in this case as it needs to store the submited information directly in the database instead of emailing it to the mail alias entry (which would not exist). Quote , osCommerce Link to comment Share on other sites More sharing options...
TB Posted January 5, 2003 Share Posted January 5, 2003 I'm putting in another 2c worth... for a grand total of 4c to this thread now! I'd just like to let you know that there are MANY viewers on this thread. Most of us are keeping quiet since we are all asking that same questions anyway! Excellent thread... As for Harald. This is just a guess, but I think the 'machine' does need sleep every now and then. :shock: Cheers, Tony Quote "The price of success is perseverance. The price of failure comes much cheaper." Link to comment Share on other sites More sharing options...
markthe5th@hotmail.com Posted January 5, 2003 Share Posted January 5, 2003 Hold on folks..I have got it working with procmail! I'll post my solution soon.. yipppeee doodle.!!!! Mark Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.