Current location: Hot Scripts Forums » Programming Languages » PHP » IMAP Forward Mail Problem


IMAP Forward Mail Problem

Reply
  #1 (permalink)  
Old 07-05-06, 05:42 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
IMAP Forward Mail Problem

I have this function:
PHP Code:

function mailfrom($fromaddress$toaddress$headers) {

$fp popen("/usr/sbin/sendmail -f$fromaddress $toaddress""w");
if (
$fp) {
fputs($fp$headers);
fputs($fp"\n.\n");
pclose($fp);
}

I am trying to use it to forward on any emails received to another address. Here is how I forward it:
PHP Code:

$full imap_fetchheader($conn$i);

$full .= imap_body($conn$i);
mailfrom($from$to$full); 
However I just get the contents of $full in the body of the email when I receive it. Any help?
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Problem - VirusScan On-Access Scan aguevara PHP 0 01-12-06 06:40 PM
Mail problem boxkites PHP 2 01-11-06 09:56 PM
mail() function problem verne PHP 4 11-23-05 01:06 PM
problem with mail() nfinity8 PHP 13 05-26-05 12:00 PM


All times are GMT -5. The time now is 07:20 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.