UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Services > Web Designing and Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-02-2008, 21:18
D.TC's Avatar
Junior Member
 
Join Date: Nov 2007
Posts: 20
Question Reading forwarded email from Perl or PHP

I know both Perl & PHP pretty well but have never had to process incoming email and have therefore come back to asking a novice question.

I need read into Perl/PHP variables email that has been forwarded to the module using the cPanel facility. If anyone has a short example script that demonstrates picking up the variable or variables that contains a forwarded email it would be much appreciated. I would prefer Perl as PHP will require a great deal more code to achieve the processing required once I have the email data, but if necessary I can live with PHP or translate the script into Perl.

Cheers
David
__________________
David T-C
www.d.tc
For the ability to read this thank a teacher
For the ability to read this in English thank a serviceman
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-02-2008, 23:47
developmentxl's Avatar
Member
 
Join Date: Nov 2007
Location: Edinburgh
Posts: 64
Default

Hi David,

Not 100% sure what you're trying to do but I do know of a PHP extension that is great for reading/parsing emails:

http://pecl.php.net/package/mailparse

Of course this is only of use if you can get access to your PHP installation...

Anyway, not sure if that's any use, but it's sort of relevant!

- Andrew
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-02-2008, 00:14
D.TC's Avatar
Junior Member
 
Join Date: Nov 2007
Posts: 20
Default

Hi Andrew,

Trying to use the cPanel facility to forward mail to a perl program from which the possibilities are endless. The main thing it provides is an alternative to quick VB/Net (yuck) (hidden FTP) programs written so that users can tailor things on their web site hosting that would otherwise require a logon level that I am not keen to give naive experimenters.

Rick has just informed me that they haven't enabled forwarding to perl and I will have to use PHP, so I am thinking laterally at the moment. Things are getting "dirty". PHP does not have all the facilities I require, so I will either have to use PHP to pass variables to Perl or run a cron, and I always try to avoid that on shared boxes.

Your pointer to the url doesn't suit this time, but I can see many times that it will for other stuff. Many thanks - it's been bookmarked.

BTW: Love your home page. Loads well too. Hope you can still get about up there - the sno looks pretty bad on some webcams.

Yours Aye
David
__________________
David T-C
www.d.tc
For the ability to read this thank a teacher
For the ability to read this in English thank a serviceman
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-02-2008, 01:15
developmentxl's Avatar
Member
 
Join Date: Nov 2007
Location: Edinburgh
Posts: 64
Default

Hi David,

Yeah it's quite cold, but we're used to it!

I can't see why, if you can pipe the emails to PHP, you can't pipe them to Perl using cPanel's "forwarders" page?

If you must use PHP, you could always just have it write the raw email data to a temp file then exec() a Perl script on this file (using http://search.cpan.org/~markov/Mail-...il/Message.pod) - messy, yes, and I'm sure you've already thought of that!

I'm afraid that's the limit of my knowledge on the subject, hope someone else can help!

- Andrew

p.s. thanks for the complements on my website hosting. Your domain is really rather awesome!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-02-2008, 13:39
D.TC's Avatar
Junior Member
 
Join Date: Nov 2007
Posts: 20
Default

Hi Andrew,
I too don't see why not a Perl is restricted unless eukhost are concerned that some users may not be aware of the security dangers of some of the more powerful facilities in Perl especially with OS calls. However as most people on these forums equate PHP to Perl, I doubt whether anyone would ever get near to using the full power of Perl.

I think I need to drop them an email stating my experience and ask them to unlock it for me as....
Quote:
Originally Posted by developmentxl View Post
If you must use PHP, you could always just have it write the raw email data to a temp file then exec() ...
... is something I have thought of too, but as we have both said, it's messy. If a temp file is used there are also timing implications (easily got around) but it just adds more hacks. I guess if eukhost won't move I will have to use a cron or get back to writing more VB/.Net
code, but that causes an additional problem as I then have to implement stuff on the client machine. A restricted visible FTP is no good as I would just get comments like "I'm not paying you to do the work myself". I guess it's just a case of - watch this space - for the moment.

Thanks for complement on domain - one day I'll put something there, but all my time seems to be spent on sites that earn. The way I came about the domain was amusing. When Turk and Caicos came on line I was there at the first minute. People in IT know me as David TC or just TC so I went for david.tc. Some company had run a batch job and it was gone along with every first name you could think of. In frustration I tried 'd' and to my surprise got it. The only problem is that some programmers think that the UK 3 letter domain rule applies world wide and restrict their forms ignoring people like BT and little ol' me, and I end up using one of my other domains at times.

I will post up developments as they come along and provided that eukhost don't offer a privileged connection I will post the code later.

David
__________________
David T-C
www.d.tc
For the ability to read this thank a teacher
For the ability to read this in English thank a serviceman
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:38.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles

Web Hosting
Web Hosting Service