[Unsupported]: Email images to your gallery - Page 4 [Unsupported]: Email images to your gallery - Page 4
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Unsupported]: Email images to your gallery

Started by rphMedia, July 17, 2006, 08:30:16 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

zapakh

Quote from: nolageek on January 18, 2007, 09:51:52 PM
If I MMS it directly to the e-mail address on my domain, it doesn't work.  newcam.php runs, the file is removed from the mailbox but doesn't get copied to the directory nor appear in the gallery.

This is the behavior I was getting when the script couldn't find a filename.  Have you finished applying my changes by removing the assignment to $filename from the dparameters[0] thing?

Quote
If I MMS it directly to my gmail account, then forward it via a FILTER to my domain's email address, not only it doesn't work but the message never gets forwarded. (does my domain block server-level forwards?)

Sounds like this is outside our scope.

Quote
If I MMS it directly to my gmail account, then forward it MANUALLY, it works just fine.

You may have to see how the email headers that come with a manually gmail-forwarded message differ from those that come with an MMS-originated message.  Send one of each type to yourself at a location where you can view that information, and compare.  It's possible that the change is gmail's use of the Content-Disposition header to specify a filename, which would avoid the filename problem I tried to patch.

nolageek

Yes, I'm pretty sure I have the edits like you suggested...


<?
######################################

#Coded By Jijo Last Update Date[Jan/19/06]
#http://phpclasses.org

#####################################




##########################################################


###################### Class readattachment ###############
class readattachment
{
function getdecodevalue($message,$coding)
{
if ($coding == 0)
{
   $message = imap_8bit($message);
}
elseif ($coding == 1)
{
  $message = imap_8bit($message);
}
elseif ($coding == 2)
{
   $message = imap_binary($message);
}
elseif ($coding == 3)
{
   $message=imap_base64($message);
   }
elseif ($coding == 4)
{
   $message = imap_qprint($message);
}
elseif ($coding == 5)
{
$message = imap_base64($message);
}
return $message;
}

function getdata($host,$login,$password,$filepath,$album,$folder)
{
$mbox = imap_open ($host,  $login, $password) or die("can't connect: " . imap_last_error());
$message = array();
$message["attachment"]["type"][0] = "text";
$message["attachment"]["type"][1] = "multipart";
$message["attachment"]["type"][2] = "message";
//$message["attachment"]["type"][3] = "application";
$message["attachment"]["type"][4] = "audio";
$message["attachment"]["type"][5] = "image";
$message["attachment"]["type"][6] = "video";
$message["attachment"]["type"][7] = "other";

for ($jk = 1; $jk <= imap_num_msg($mbox); $jk++)
{
        $headerinfo = imap_header($mbox, $jk);
        $subject = $headerinfo->Subject;
                        $matches = array();
                        if (preg_match('/^=\?[^?]*\?B\?(.*)\?=/m', $subject, $matches))
                                $subject = base64_decode($matches[1]);

$structure = imap_fetchstructure($mbox, $jk , FT_UID);   
$parts = $structure->parts;
$fpos=2;
for($i = 1; $i < count($parts); $i++)
   {
$message["pid"][$i] = ($i);
$part = $parts[$i];

if(TRUE)
{
    $message["type"][$i] = $message["attachment"]["type"][$part->type] . "/" . strtolower($part->subtype);
$message["subtype"][$i] = strtolower($part->subtype);
$ext=$part->subtype;
                if ($part->ifdparameters)
                  foreach($part->dparameters as $dparam)
                    if (strtolower($dparam->attribute) == 'filename') $filename = $dparam->value;
                if (empty($filename))
                  if ($part->ifparameters)
                    foreach($part->parameters as $param)
                      if (strtolower($param->attribute) == 'name') $filename = $param->value;
                if (empty($filename)) $filename = 'nfn' . rand() . '.' . strtolower($part->subtype);


        $mege="";
$data="";
  $mege = imap_fetchbody($mbox,$jk,$fpos); 
$fp=fopen($filepath . $filename,w);
$data=$this->getdecodevalue($mege,$part->type);

fputs($fp,$data);
fclose($fp);
add_picture($album, $folder, $filename, 0, $subject);
$fpos+=1;

}

}
imap_delete($mbox,$jk);
}
imap_expunge($mbox);
imap_close($mbox);
}
}
?>

zapakh

Any chance you could get a full readout of the e-mail headers of the offending MMS-generated email and post them here for us to look at?

nolageek

#63
I'm back!  This is a message that does not work.

Subject:      Multimedia message
From:      XXXXXX AT mms.mycingular DOT com
Date:      Fri, January 19, 2007 7:44 am
To:      YYYY@meninshirtandtie DOT com
Priority:      Normal

Viewing Full Header - View message
Return-path: <XXXXXX AT mms.mycingular DOT com>
Envelope-to: YYYY AT meninshirtandtie DOT com
Delivery-date: Fri, 19 Jan 2007 07:44:03 -0600
Received: from [66.102.165.6] (helo=atlmtaow01.cingularme DOT com)
     by sun.bounceweb.com with esmtp (Exim 4.63)
     (envelope-from <XXXXXX AT mms.mycingular DOT com>)
     id 1H7u2E-0002pF-Oo
     for YYYY AT meninshirtandtie DOT com; Fri, 19 Jan 2007 07:44:03 -0600
X-Mms-MMS-Version: 16
Date: Fri, 19 Jan 2007 08:44:03 -0500
X-Nokia-Ag-Internal: ; smiltype=true; internaldate=1169214243916
Content-Type: multipart/mixed; boundary="----=_Part_1973954_8132742.1169214243922"
X-Mms-Delivery-Report: 1
Received: from alpagw02 ([209.183.34.196]) by atlmtaow01.cingularme DOT com (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20070119134403.KKVM2373.atlmtaow01.cingularme DOT com AT alpagw02> for <YYYY@meninshirtandtie DOT com>; Fri, 19 Jan 2007 08:44:03 -0500
X-Mms-Transaction-ID: 1169192597
From: <XXXXXX AT mms.mycingular DOT com>
To: YYYY AT meninshirtandtie DOT com
X-Mms-Read-Reply: 1
X-Mms-Expiry: RELATIVE: 50763648
Mime-Version: 1.0
Message-ID: <24947488.1169214243940.JavaMail.wluser AT alpagw02>
X-Mms-Priority: 1
X-Mms-Message-Type: 0
Subject: Multimedia message
X-Nokia-Ag-Version: 2.0



Attachments:
cid: 01-17-07_0850.jpg





This one does work, and it was send directly to a gmail account, then manually forwarded to my domain.

Subject:      Multimedia message
From:      "YYYY" <YYYY AT gmail DOT com>
Date:      Fri, January 19, 2007 7:50 am
To:      YYYY AT meninshirtandtie DOT com
Priority:      Normal

Return-path: <YYYY AT gmail DOT com>
Envelope-to: YYYY AT meninshirtandtie DOT com
Delivery-date: Fri, 19 Jan 2007 07:50:03 -0600
Received: from [72.14.246.250] (helo=ag-out-0708.google DOT com)
     by sun.bounceweb.com with esmtp (Exim 4.63)
     (envelope-from <YYYY AT gmail DOT com>)
     id 1H7u82-0003YG-J1
     for YYYY AT meninshirtandtie DOT com; Fri, 19 Jan 2007 07:50:02 -0600
Received: by ag-out-0708.google DOT com with SMTP id 8so439894agc
     for <YYYY AT meninshirtandtie DOT com>; Fri, 19 Jan 2007 05:50:04 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws;
     d=gmail.com; s=beta;
     h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references;
     b=sQyvlm3rc/hc+K46GTduZKZpKaLN2HW85NhGtI7XHS0+6b5SF3Qd+sT/G+xvuCKofy6Uajec1CVUZCjLa9a7DsKTNkyAzqyP1PXFIyEuudJmanycLvaRPnff00vOADE4zjQB5t+KPVXQVeEApU8hkiS40Hn8LcQBkOHOEq+BVG4=
Received: by 10.90.92.7 with SMTP id p7mr2829067agb.1169214604091;
     Fri, 19 Jan 2007 05:50:04 -0800 (PST)
Received: by 10.90.114.15 with HTTP; Fri, 19 Jan 2007 05:50:03 -0800 (PST)
Message-ID: <8d1136e30701190550j338a21fcpda2584a98a7c2656@mail.gmail.com>
Date: Fri, 19 Jan 2007 07:50:03 -0600
From: "YYYY" < YYYY AT gmail DOT com>
To: YYYY AT meninshirtandtie DOT com
Subject: Multimedia message
In-Reply-To: <8d1136e30701181316x7d90edd2i4d0ab05e341af428@mail.gmail DOT com>
MIME-Version: 1.0
Content-Type: multipart/mixed;
     boundary="----=_Part_112348_20826568.1169214603255"
References: <30048422.1169153442114.JavaMail.wluser@alpagw01>
     <8d1136e30701181316x7d90edd2i4d0ab05e341af428@mail.gmail DOT com>

untitled-[1.2]    0 k     [ text/html ]    
cid: 01-17-07_0908.jpg    42 k     [ image/jpeg ]




Hope this helps!

[Edited By Sami]:
Removed email address as requested

zapakh

#64
The complete headers from nolageek:


Return-Path: <XXXXXX AT mms DOT mycingular DOT com>
Received: from hitman1 DOT fuse DOT net ([69 DOT 89 DOT 21 DOT 25]) by mx3 DOT fuse DOT net
          (InterMail vM DOT 6 DOT 01 DOT 04 DOT 04 201-2131-118-104-20050224) with ESMTP
          id <20070119175933 DOT NIQR13749 DOT mx3 DOT fuse DOT net AT hitman1 DOT fuse DOT net>
          for <pricero AT fuse DOT net>; Fri, 19 Jan 2007 12:59:33 -0500
Received: from outbound-mail-65 DOT bluehost DOT com ([69 DOT 89 DOT 21 DOT 25])
          by hitman1 DOT fuse DOT net with SMTP
          id <20070119175928 DOT GEWT22353 DOT hitman1 DOT fuse DOT net AT outbound-mail-65 DOT bluehost DOT com>
          for <pricero AT fuse DOT net>; Fri, 19 Jan 2007 12:59:28 -0500
Received: (qmail 20965 invoked by uid 0); 19 Jan 2007 17:59:26 -0000
Received: from unknown (HELO box111 DOT bluehost DOT com) (70 DOT 103 DOT 189 DOT 170)
  by mailproxy4 DOT bluehost DOT com with SMTP; 19 Jan 2007 17:59:26 -0000
Received: from atlmtaow01 DOT cingularme DOT com ([66 DOT 102 DOT 165 DOT 6])
by box111 DOT bluehost DOT com with esmtp (Exim 4 DOT 63)
(envelope-from <XXXXXX AT mms DOT mycingular DOT com>)
id 1H7y1M-0002Tn-NB
for pricero AT proxims DOT com; Fri, 19 Jan 2007 10:59:25 -0700
X-Mms-MMS-Version: 16
Date: Fri, 19 Jan 2007 12:59:19 -0500
X-Nokia-Ag-Internal: ; smiltype=true; internaldate=1169229559544
Content-Type: multipart/mixed;
  boundary="----=_Part_2072086_25268642 DOT 1169229559556"
X-Mms-Delivery-Report: 1
Received: from alpagw02 ([209 DOT 183 DOT 34 DOT 196]) by atlmtaow01 DOT cingularme DOT com (InterMail vM DOT 6 DOT 01 DOT 04 DOT 00 201-2131-118-20041027) with ESMTP id <20070119175919 DOT LWIN2373 DOT atlmtaow01 DOT cingularme DOT com AT alpagw02> for <pricero AT proxims DOT com>; Fri, 19 Jan 2007 12:59:19 -0500
X-Mms-Transaction-ID: 1169207915
From: <XXXXXX AT mms DOT mycingular DOT com>
To: pricero AT proxims DOT com
X-Mms-Read-Reply: 1
X-Mms-Expiry: RELATIVE: 50763648
Mime-Version: 1 DOT 0
Message-ID: <18938791 DOT 1169229559690 DOT JavaMail DOT wluser AT alpagw02>
X-Mms-Priority: 1
X-Mms-Message-Type: 0
Subject: Multimedia message
X-Nokia-Ag-Version: 2 DOT 0
Status: R
X-Status: NC
X-KMail-EncryptionState: 
X-KMail-SignatureState: 
X-KMail-MDN-Sent: 

------=_Part_2072086_25268642 DOT 1169229559556
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Location: 01-17-07_2358 DOT jpg
Content-ID: <01-17-07_2358 DOT jpg>
Content-Disposition: inline

/9j/4QXtRXhpZgAATU0AKgAAAAgABQEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAL/
/wITAAMAAAABAAH//4dpAAQAAAABAAAAuAAAAFoAAABIAAAAAQAAAEgAAAABAAYBAwADAAAAAQAG
DOT  DOT  DOT


This wireless provider's MMS thing is sending the image as the one and only message part.  This mod until now has skipped looking at the first part, assuming it to be an uninteresting text section.

Therefore, replace these lines:


$fpos=2;
    for($i = 1; $i < count($parts); $i++)


with these (two modifications) :


$fpos=1;
    for($i = 0; $i < count($parts); $i++)


A couple lines later, immediately after the line


    $part = $parts[$i];


insert the lines:


    if ($part->type == 0) {
        $fpos+=1;
        continue;
    }



[edited By Sami]:
Removed email address as requested

zapakh

Quote from: jahumphr on November 28, 2006, 03:16:48 AM
I left off the fact that if you dont include a subject and some text in the body the email attachment will not post.
I wonder if this problem wasn't related to nolageek's.  Maybe the above change fixes both.  However, an attachment could still go undetected if the MMS gateway is diabolical enough to wrap it in multiple nested multipart parts.

zapakh

Quote from: zapakh on January 19, 2007, 09:48:42 PM
This wireless provider's MMS thing is sending the image as the one and only message part.

Also, the image part lacks both a name parameter on its Content-Type and a filename parameter on Content-Disposition, so you'd still end up with a filename that looks like 'nfn' . rand()

To correct this, we can make use of the supplied Content-ID header.  To do that, just before the line

    if (empty($filename)) $filename = 'nfn' . rand() . '.' . strtolower($part->subtype);


insert the lines

    if (empty($filename) && $part->ifid)
        $filename = trim($part->id, '<>');


Thanks nolageek for the information about your wireless provider's MMS output.

carverjnr

Hopefully this topic isn't dead yet... It's a great mod! However, I spent hours trying to get it to work (by regular email, not MMS), with no success. The file was removed from my email server, but not stored into any folder or album. I tried all the code changes, etc, but nothing.

About 1:00am I discovered the cause: All my test emails were being sent through Mozilla Thunderbird as the email client. I then decided to give Outlook Express a go, and "presto", it worked, first time.

So, that's the cause of the problem. Now can anyone suggest a solution? I much prefer Thunderbird to Outlook Express, so would prefer to send emails via Thunderbird, but the attachments don't work.

Why do Outlook Express emails work and not Thunderbird's?  ??? Other than the email client, everything else is the same (ie I'm using the same sending account).

Many thanks for any suggestions  :)

zapakh

Quote from: carverjnr on March 07, 2007, 03:14:31 PM
About 1:00am I discovered the cause: All my test emails were being sent through Mozilla Thunderbird as the email client. I then decided to give Outlook Express a go, and "presto", it worked, first time.

So, that's the cause of the problem. Now can anyone suggest a solution? I much prefer Thunderbird to Outlook Express, so would prefer to send emails via Thunderbird, but the attachments don't work.

Given that the email disappears and no image appears, it certainly sounds as if the mod isn't finding the attachment.  For a start, please post the headers of an offending email message, as was done previously above in

http://forum.coppermine-gallery.net/index.php?topic=33950.msg191410#msg191410

carverjnr

Thanks for the reply zapakh. Here's the header from emails sent through Mozilla Thunderbird (1.5.0.10) (ie this is the email header which does NOT work):  :(

Return-path: <cj@carversonline.com>
Envelope-to: photo@carversonline.com
Delivery-date: Wed, 07 Mar 2007 16:00:25 -0600
Received: from adsl-3-067.nsw.dft.com.au ([202.76.177.67] helo=[127.0.0.1])
by hathor.sslcatacombnetworking.com with esmtpa (Exim 4.63)
(envelope-from <cj@carversonline.com>)
id 1HP4BL-0005QI-37
for photo@carversonline.com; Wed, 07 Mar 2007 16:00:25 -0600
Message-ID: <45EF35F2.4050807@carversonline.com>
Date: Thu, 08 Mar 2007 09:00:18 +1100
From: "cj@carversonline.com" <cj@carversonline.com>
Reply-To:  cj@carversonline.com
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
To:  photo@carversonline.com
Subject: Test from Thunderbird
Content-Type: multipart/mixed;
boundary="------------050604090302070408060908"

This is a multi-part message in MIME format.
--------------050604090302070408060908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<small><font face="Helvetica, Arial, sans-serif">Test from Thunderbird</font></small>
</body>
</html>

--------------050604090302070408060908
Content-Type: image/jpeg;
name="P1020731.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="P1020731.jpg"

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQY
...


carverjnr

Hang on everyone... I've carefully re-done all "the mods to the mod" as listed in the posts on this topic, and Thunderbird IS working ;D.

Very sorry for leading you up the garden path...   Must have been a typo.  :-[

It took the mods (eg MMS mods) to get it going though.

rphMedia

A couple of you are sending emails that exceed 2MBs.  I explained in the first post that the current limit is 1MB.  Whoever "rafy AT cogeco DOT com" is, you're the latest victim.  Try again with a smaller image.

helmutmk

Hello,
I crying. I install the software but I get no picture in my Album. I test with the the Server from rphmedia, works fine (upload as Mail and as MMS) but no chance by me.

I using coppermine 1.4.10
The Mail Header:
QuoteContent-Type:  multipart/related; type="multipart/alternative"; boundary="===============1443990321=="
Date:  Sun, 27 May 2007 19:30:28 +0200 [19:30:28 CEST]
Delivered-To:  3-pix@swedesign.de
emrout@mmsreply.tacn.detemobil.de

From:  "xxxxx@mmsreply.t-mobile.de" <NcBZRuOQ67l6jUvPoyvKv0u97y3rusXTdClTi7ah@mmsreply.t-mobile.de>
MIME-Version:  1.0
Message-Id:  <20070527173029.994F31100001@outmta.t-mobile.de>
Original_Msg_Size:  23060
Received:  (qmail 19024 invoked from network); 27 May 2007 19:31:07 +0200
from replymta.mmsreply.t-mobile.de (193.254.161.100) by goes-to.com with SMTP; 27 May 2007 19:31:07 +0200
from outmta.t-mobile.de (unknown [172.28.13.25]) by replymta.mmsreply.t-mobile.de (Postfix) with ESMTP id 9DE05117480C for <pix@swedesign.de>; Sun, 27 May 2007 19:30:29 +0200 (CEST)
from [10.101.82.17] (localhost.localdomain [127.0.0.1]) by outmta.t-mobile.de (Postfix) with ESMTP id 994F31100001 for <pix@swedesign.de>; Sun, 27 May 2007 19:30:29 +0200 (CEST)
from mms1.t-mobile.de (unknown [10.65.32.133]) by mmsreply.tacn.detemobil.de (Postfix) with ESMTP id 2B09610A8001 for <pix@swedesign.de>; Sun, 27 May 2007 19:30:28 +0200 (CEST)

Received-SPF:  none (goes-to.com: domain at mmsreply.t-mobile.de does not designate permitted sender hosts)
Return-Path:  <xxxx@mmsreply.t-mobile.de>
Subject:  Fw: L
To:  pix@swedesign.de
X-Mms-Delivery-Report:  No
X-Mms-Delivery-Time:  Sun, 27 May 2007 17:30:28 GMT
X-Mms-MMS-Version:  1.2
X-Mms-Message-Class:  Personal
X-Mms-Message-ID:  m69w2ty2k0ysgjbv300@mms.t-mobile.de
X-Mms-Message-Size:  21979
X-Mms-Message-Type:  m-send-req
X-Mms-Read-Reply:  No
X-Mms-Read-Report:  No
X-Mms-Sender-Visibility:  Show
X-Mms-Transaction-ID:  b-2694d791@
X-Priority:  3
X-Spam-Checker-Version:  SpamAssassin 3.0.4 (2005-06-05) on h894073.serverkompetenz.net
X-Spam-Level:  ***
X-Spam-Status:  No, score=3.3 required=5.0 tests=EXTRA_MPART_TYPE, FROM_ENDS_IN_NUMS,FROM_HAS_MIXED_NUMS,FROM_HAS_MIXED_NUMS3, HTML_MESSAGE,PRIORITY_NO_NAME autolearn=no version=3.0.4

The newcam.php
<?php
define
('IN_COPPERMINE'true);
require(
'include/picmgmt.inc.php');
require_once(
"attachmentread.class.php"); 
$host="{swedesign.de:110/pop3/novalidate-cert}"// pop3host
//$host="{swedesign.de:110/pop3}";
$login="xxx@swedesign.de"//pop3 login 
$password="****"//pop3 password 
$filepath="/vvvvvvvvvvvvvvv/httpdocs/albums/temppix/"
$album="78"// album id #
$folder "temppix/"// foldername with a /
$jk=new readattachment(); // Creating instance of class#### 
$jk->getdata($host,$login,$password,$filepath,$album,$folder); // calling member function 
?>


<?php
######################################

#Coded By Jijo Last Update Date[Jan/19/06]
#http://phpclasses.org

#####################################




##########################################################


###################### Class readattachment ###############
class readattachment
{
function getdecodevalue($message,$coding)
{
if ($coding == 0

   $message imap_8bit($message); 

elseif ($coding == 1

  $message imap_8bit($message); 

elseif ($coding == 2

   $message imap_binary($message); 

elseif ($coding == 3

   $message=imap_base64($message); 
   } 
elseif ($coding == 4

   $message imap_qprint($message); 

elseif ($coding == 5

 $message imap_base64($message); 

return $message;
}

function getdata($host,$login,$password,$filepath,$album,$folder)
{
$mbox imap_open ($host,  $login$password) or die("can't connect: " imap_last_error());
$message = array();
$message["attachment"]["type"][0] = "text";
$message["attachment"]["type"][1] = "multipart";
$message["attachment"]["type"][2] = "message";
//$message["attachment"]["type"][3] = "application";
$message["attachment"]["type"][4] = "audio";
$message["attachment"]["type"][5] = "image";
$message["attachment"]["type"][6] = "video";
$message["attachment"]["type"][7] = "other";

for ($jk 1$jk <= imap_num_msg($mbox); $jk++)
{
$structure imap_fetchstructure($mbox$jk FT_UID);    
$parts $structure->parts;
$fpos=2;
for($i 1$i count($parts); $i++)
   {
$message["pid"][$i] = ($i);
$part $parts[$i];

//if($part->disposition == "ATTACHMENT") 
  if($part->disposition == "ATTACHMENT" || $part->disposition == "INLINE")
{
    
$message["type"][$i] = $message["attachment"]["type"][$part->type] . "/" strtolower($part->subtype);
$message["subtype"][$i] = strtolower($part->subtype);
$ext=$part->subtype;
$params $part->dparameters;
$filename=$part->dparameters[0]->value;

        $mege="";
$data="";
   $mege imap_fetchbody($mbox,$jk,$fpos);  
$fp=fopen($filepath $filename,w);
$data=$this->getdecodevalue($mege,$part->type);

fputs($fp,$data);
fclose($fp);
add_picture($album$folder$filename);
$fpos+=1;

}

}
//imap_delete($mbox,$jk);
}
//imap_expunge($mbox);
imap_close($mbox);
}
}
?>


Can anybody help me, I try also the solutions from zapakh , nothing.

Bet regards
Helmut

mmek

Hi All,

Can you guys tell me where I can download this MOD?  Maybe I am just bind :) but I can't seem to find it.

Thanks.

rphMedia

#74
Edit; original post produced in error.

helmutmk

Hella,
I solve my problem, very simpel, the filepath was not correct :(

The code to download is on page 1 "Reply #5 on: August 26, 2006, 12:31:26 PM" posting number six.

Best regards
Helmut

mmek

Quote from: mmek on May 27, 2007, 09:42:28 PM
Hi All,

Can you guys tell me where I can download this MOD?  Maybe I am just bind :) but I can't seem to find it.

Thanks.

Thanks for the location guys.  I am not sure how I missed that!

I do have another question though!


Here is what I've done:

  • I copied the 3 files to my website
  • modified the newcam.php to reflect my information and path
  • renamed the anycontent1.php to anycontent.php
  • added anycontent to the Album List view
  • granted write permissions to the folder
  • granted "Visitors can upload files"

But the pictures still do not upload correctly.  I know that the email works because I put in an echo within the attachmentread.class.php.  Is there something else I should be doing?

Please let me know.

Thans for the great work.


mmek

Quote from: mmek on May 27, 2007, 11:48:09 PM
Thanks for the location guys.  I am not sure how I missed that!

I do have another question though!


Here is what I've done:

  • I copied the 3 files to my website
  • modified the newcam.php to reflect my information and path
  • renamed the anycontent1.php to anycontent.php
  • added anycontent to the Album List view
  • granted write permissions to the folder
  • granted "Visitors can upload files"

But the pictures still do not upload correctly.  I know that the email works because I put in an echo within the attachmentread.class.php.  Is there something else I should be doing?

Please let me know.

Thans for the great work.



Sorry guys!  Found my own mistake.  My filepath was not set correctly in newcam.php

Works like a charm.

Thanks.

Dwilliams

Good afternoon everyone,
  I hope that this topic is still being monitored because this is an excellent mod. I am having an issue with getting mine to work with my gallery page and wanted to know if someone with experience in this would be able to send me in the right direction.


  • I have uploaded the 3 files to the root of my coppermine directory
  • I created a new email account for the images to go to
  • I Set the folder permissions
  • Configured the newcam file
  • Added a case to the index file as suggested in one of the first messages of this thread
  • Allow visitors to upload files
When I copy the new index.php to the coppermine root, I get a ton of garbage up on my screen and not the main gallery page example:

$lang_album_admin_menu['confirm_delete'], '{DELETE}' => $lang_album_admin_menu['delete'], '{MODIFY}' => $lang_album_admin_menu['modify'], '{EDIT_PICS}' => $lang_album_admin_menu['edit_pics'], ); $template = template_eval($template_album_admin_menu, $params); } $params = array('{ALBUM_ID}' => $id, ); return template_eval($template, $params); } /** * get_subcat_data() * * Get the data about the sub categories which are going to be shown on the index page, this function is called recursively * * @param integer $parent Parent Category * @param array $cat_data * @param array $album_set_array * @param integer $level Level being displayed * @param string $ident String to use as indentation for Categories * @return void **/ function get_subcat_data($parent, &$cat_data, &$album_set_array, $level, $ident = '') { global $CONFIG, $HIDE_USER_CAT, $FORBIDDEN_SET, $cpg_show_private_album; $album_filter = ''; $pic_filter = ''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and ' . str_replace('p.', 'a.', $FORBIDDEN_SET); $pic_filter = ' and ' . str_replace('p.', $CONFIG['TABLE_PICTURES'] . '.', $FORBIDDEN_SET); } if ($CONFIG['categories_alpha_sort'] == 1) {$cat_sort_order = 'name';}else{$cat_sort_order = 'pos';} $result = cpg_db_query("SELECT cid, name, description, thumb FROM

I have also included my newcam.php file:
<?php
define
('IN_COPPERMINE'true);
require(
'include/picmgmt.inc.php');
require_once(
"attachmentread.class.php"); 
$host="{mail.gallery.hlcmarketingcorner.com:110/pop3}"// pop3host 
$login="****@gallery.hlcmarketingcorner.com"//pop3 login 
$password="****"//pop3 password 
$filepath=$_SERVER["DOCUMENT_ROOT"]."/albums/Custom/";  ; // attachement will save in same directory where scripts run, otherwise give abs path 
$album="7"// album id #
$folder "Custom/"// foldername with a /
$jk=new readattachment(); // Creating instance of class#### 
$jk->getdata($host,$login,$password,$filepath,$album,$folder); // calling member function 
?>


and added the suggested items to the anycontent.php
*/

if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

starttable("100%", "Welcome");
include("newcam.php");

?>
<tr><td class="tableb" >

and lastly the index.php snippet

                    case 'anycontent':
                        if ($cat == 0) {
                            ob_start();
                            /**
                             * Any php code or HTML can be put in this file and will be displayed
                             */
                            include('anycontent.php');
                            $anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
                            ob_end_clean();
                            echo ($anycontent);
                        }
                        flush();
                        break;
case 'receivemail':
                if ($cat == 0) {
                    include('RPHMEDIA-FILE.php');
                }
                flush();
                break;
                }
            }
        }
    }


What am I missing here?
Thank you for taking the time to read this.

Dwilliams

Quoteood afternoon everyone,
  I hope that this topic is still being monitored because this is an excellent mod. I am having an issue with getting mine to work with my gallery page and wanted to know if someone with experience in this would be able to send me in the right direction.

    * I have uploaded the 3 files to the root of my coppermine directory
    * I created a new email account for the images to go to
    * I Set the folder permissions
    * Configured the newcam file
    * Added a case to the index file as suggested in one of the first messages of this thread
    * Allow visitors to upload files

After a reinstall and carefully following the instructions I have gotten it to work-----Once since that first message it will only delete the messages now and not post the image. What could have changed here that is causing this?