Development Articles
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDevelopment Articles

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 12th, 2002, 01:56 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
How to redirect attachments

Hi,

A very intresting and useful article. Thanks.
I have a doubt.I want to save the attachments in a mail to a folder on the server(same server). How do I accomplish this.
Many thanks again

Reply With Quote
  #2  
Old January 12th, 2002, 02:24 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
One improvement.

Hello,

Nice explanation of multipart message handling.

I have only thing to suggest. You are allowing user to download attachments regardless of the type.

What can be done is that check the type of attachment,

If its JPG or GIF, display it in browser itself, that would be most convenient for user.

Also if attachment is HTML file you can display it right there.

We can simply check $type variable and take appropriate action. [ a simple switch statement would do. ]

Also I noticed that you are using

for($x=0; $x<sizeof($sections); $x++)

Here if you can see, sizeof would be called N times where N is number of elements in $sections. This would have effect if you have variable with lots of elements.

Better would be,
$num = sizeof($sections);
for($x=0; $x<sizeof($num); $x++)

nd as I said in my comment of first part of this series, POP server is not always the one which follows the @ sign.


Otherwise nice article,

JD


Reply With Quote
  #3  
Old January 12th, 2002, 02:26 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Problem

I guess there is problem with comment system,

I was talking about the for loop code and its getting trimmed, I wonder why.

I was suggesting that call to sizeof should be outside for loop so that it doesnt get called N times.

JD

Reply With Quote
  #4  
Old January 12th, 2002, 08:23 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Attachment problem

I am having a problem that all the emails that the attachment section is processing have an "inline" disposition? therfore when I test for attachments it comes back as none weither the e-mail has one or not ... if anyone else is having this problem please let me know.

-Mikey out

Reply With Quote
  #5  
Old January 14th, 2002, 08:33 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re:

There's a fairly easy hack for this - just alter the attachment handling function to also register information on inline attachments.

The wonder of reusable functions.

Reply With Quote
  #6  
Old January 14th, 2002, 08:36 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re:

Sure, you can implement a check-type-and-display function. The point is that different mail clients handle attachments differently - it depends on the user requirements. So you can set it up the way you like - the code is just a template for you to play with.

Reply With Quote
  #7  
Old January 14th, 2002, 08:38 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
[no subject]

You can copy the decoded attachment using copy()

Reply With Quote
  #8  
Old January 14th, 2002, 11:10 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Comment system

If you are having problems posting, you may be doing something that confuses the structured text engine.

Here's a guide to structured text:

"http://www.devshed.com/Server_Side/PHP/PHPMail/PHPMail2/comments/225929353/structured_text":http://www.devshed.com/Server_Side/PHP/PHPMail/PHPMail2/comments/225929353/structured_text

Reply With Quote
  #9  
Old January 14th, 2002, 10:42 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Comment system

I guess I have gone through it.

basically I want to write a for loop to show some code and any how it is stripping them and I wonder why.

JD

Reply With Quote
  #10  
Old January 14th, 2002, 11:13 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Re: Comment system

Check the source of the page http://www.devshed.com/Server_Side/PHP/PHPMail/PHPMail2/comments/225929353
and you can see that the code is there intact. the less then symbol is being inerpreted by the browser as a tag. try using &lt; and &gt; when posting code.

Reply With Quote
  #11  
Old January 14th, 2002, 11:24 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Re: Re: Comment system

I think in that case they need to change the comment code a bit.

JD

Reply With Quote
  #12  
Old January 15th, 2002, 09:37 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
we should really beef this up

*I have a desparate need for this*, and I would like to contribute! My on-the-road sales ghouls need to be able to get at their mail. Browser accessed mail seems the way to go. The first thing I will change is adding this to the list.php:

<META HTTP-EQUIV="refresh" CONTENT="300">

and changing all the hard coded formating to CSS.

Reply With Quote
  #13  
Old January 15th, 2002, 09:55 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: One improvement.

JD: I can see why you are saying that the POP server isn't always what follows the @, but for the purposes of making this work, the form isn't really asking for the end user's email addy; it's asking for username@POPserver. Personally, I plan to only ask for a username, and hard code the POP server, because I only want people looking at mail on my server!

thx,
CF

Reply With Quote
  #14  
Old January 15th, 2002, 10:48 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Re: One improvement.

I just put it up cause I felt like this point wasn't made clear.
JD

Reply With Quote
  #15  
Old January 15th, 2002, 10:51 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Re: Re: One improvement.

Well, I would agree...

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDevelopment Articles > Building A PHP-Based Mail Client (part 2)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT