Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #14412
| From | Jan Novak <repcom@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: mail attachment |
| Date | 2014-10-27 09:23 +0100 |
| Organization | albasani.net |
| Message-ID | <m2kvg0$3ts$1@news.albasani.net> (permalink) |
| References | <m25ma0$bmf$1@news.albasani.net> <10481010.O8SIMfjRTL@PointedEars.de> <m2a83a$u0o$1@news.albasani.net> <m2dqot$477$1@dont-email.me> |
Am 24.10.2014 um 17:21 schrieb Jerry Stuckle:
> To start, on your development system, ensure you have in your php.ini file:
>
> error_reporting=E_ALL;
> display_errors=on;
yes, its there !
> Also, this is a great time for using a debugger (I prefer xdebug with
> Eclipse IDE). You can step through your code, looking at variables and
> function call results. I greatly speeds up troubleshooting on problems
> like this.
It sounds interesting - i use eclipse too.
>
> But lacking a debugger, you can add some statements to For more
> diagnostic information, please see below.
>> function get_part($imap, $uid, $mimetype, $structure = false,
>> $partNumber = false) {
>> if (!$structure) {
>> $structure = imap_fetchstructure($imap, $uid, FT_UID);
>> }
>
> Everything in the imap_fetch functions depends on the contents of this
> structure. So, let's start here. What do you get if you add:
>
> var_dump($structure);
>
>> if ($structure) {
>> if ($mimetype == get_mime_type($structure)) {
>
> Also, what is in $mimetype at this point? So does it match the mime
> type in $structure?
>
> echo "mimetype=$mimetype\n";
>
>> if (!$partNumber) {
>> $partNumber = 1;
Then i get this below from the Mailbox (and like you see: no attachment
will be shown - but there is already one file attached when i look into
my mailbox with a mailer).
The connection is with imap on port 993 with /ssl/novalidate-cert
options (because it is a self signed cert).
If i make the connection with pop and /notls (and port110) i get
everything, but - you know - i dont want to use unencrypted protokoll.
object(stdClass)#14 (11) { ["type"]=> int(1) ["encoding"]=> int(0)
["ifsubtype"]=> int(1) ["subtype"]=> string(5) "MIXED"
["ifdescription"]=> int(0) ["ifid"]=> int(0) ["ifdisposition"]=> int(0)
["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=>
array(1) { [0]=> object(stdClass)#15 (2) { ["attribute"]=> string(8)
"boundary" ["value"]=> string(36) "------------090702060002040607040204"
} } ["parts"]=> array(2) { [0]=> object(stdClass)#16 (12) { ["type"]=>
int(0) ["encoding"]=> int(0) ["ifsubtype"]=> int(1) ["subtype"]=>
string(5) "PLAIN" ["ifdescription"]=> int(0) ["ifid"]=> int(0)
["lines"]=> int(4) ["bytes"]=> int(18) ["ifdisposition"]=> int(0)
["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=>
array(2) { [0]=> object(stdClass)#17 (2) { ["attribute"]=> string(7)
"charset" ["value"]=> string(12) "windows-1252" } [1]=>
object(stdClass)#18 (2) { ["attribute"]=> string(6) "format" ["value"]=>
string(6) "flowed" } } } [1]=> object(stdClass)#19 (13) { ["type"]=>
int(3) ["encoding"]=> int(3) ["ifsubtype"]=> int(1) ["subtype"]=>
string(3) "PDF" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["bytes"]=>
int(121404) ["ifdisposition"]=> int(1) ["disposition"]=> string(10)
"attachment" ["ifdparameters"]=> int(1) ["dparameters"]=> array(1) {
[0]=> object(stdClass)#20 (2) { ["attribute"]=> string(8) "filename"
["value"]=> string(27) "Dok 27. Okt. 2014 08:24.pdf" } }
["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=>
object(stdClass)#21 (2) { ["attribute"]=> string(4) "name" ["value"]=>
string(27) "Dok 27. Okt. 2014 08:24.pdf" } } } } } object(stdClass)#16
(12) { ["type"]=> int(0) ["encoding"]=> int(0) ["ifsubtype"]=> int(1)
["subtype"]=> string(5) "PLAIN" ["ifdescription"]=> int(0) ["ifid"]=>
int(0) ["lines"]=> int(4) ["bytes"]=> int(18) ["ifdisposition"]=> int(0)
["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=>
array(2) { [0]=> object(stdClass)#17 (2) { ["attribute"]=> string(7)
"charset" ["value"]=> string(12) "windows-1252" } [1]=>
object(stdClass)#18 (2) { ["attribute"]=> string(6) "format" ["value"]=>
string(6) "flowed" } } } object(stdClass)#19 (13) { ["type"]=> int(3)
["encoding"]=> int(3) ["ifsubtype"]=> int(1) ["subtype"]=> string(3)
"PDF" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["bytes"]=>
int(121404) ["ifdisposition"]=> int(1) ["disposition"]=> string(10)
"attachment" ["ifdparameters"]=> int(1) ["dparameters"]=> array(1) {
[0]=> object(stdClass)#20 (2) { ["attribute"]=> string(8) "filename"
["value"]=> string(27) "Dok 27. Okt. 2014 08:24.pdf" } }
["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=>
object(stdClass)#21 (2) { ["attribute"]=> string(4) "name" ["value"]=>
string(27) "Dok 27. Okt. 2014 08:24.pdf" } } } object(stdClass)#19 (11)
{ ["type"]=> int(1) ["encoding"]=> int(0) ["ifsubtype"]=> int(1)
["subtype"]=> string(5) "MIXED" ["ifdescription"]=> int(0) ["ifid"]=>
int(0) ["ifdisposition"]=> int(0) ["ifdparameters"]=> int(0)
["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=>
object(stdClass)#21 (2) { ["attribute"]=> string(8) "boundary"
["value"]=> string(36) "------------090702060002040607040204" } }
["parts"]=> array(2) { [0]=> object(stdClass)#20 (12) { ["type"]=>
int(0) ["encoding"]=> int(0) ["ifsubtype"]=> int(1) ["subtype"]=>
string(5) "PLAIN" ["ifdescription"]=> int(0) ["ifid"]=> int(0)
["lines"]=> int(4) ["bytes"]=> int(18) ["ifdisposition"]=> int(0)
["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=>
array(2) { [0]=> object(stdClass)#14 (2) { ["attribute"]=> string(7)
"charset" ["value"]=> string(12) "windows-1252" } [1]=>
object(stdClass)#16 (2) { ["attribute"]=> string(6) "format" ["value"]=>
string(6) "flowed" } } } [1]=> object(stdClass)#18 (13) { ["type"]=>
int(3) ["encoding"]=> int(3) ["ifsubtype"]=> int(1) ["subtype"]=>
string(3) "PDF" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["bytes"]=>
int(121404) ["ifdisposition"]=> int(1) ["disposition"]=> string(10)
"attachment" ["ifdparameters"]=> int(1) ["dparameters"]=> array(1) {
[0]=> object(stdClass)#17 (2) { ["attribute"]=> string(8) "filename"
["value"]=> string(27) "Dok 27. Okt. 2014 08:24.pdf" } }
["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=>
object(stdClass)#15 (2) { ["attribute"]=> string(4) "name" ["value"]=>
string(27) "Dok 27. Okt. 2014 08:24.pdf" } } } } } object(stdClass)#20
(12) { ["type"]=> int(0) ["encoding"]=> int(0) ["ifsubtype"]=> int(1)
["subtype"]=> string(5) "PLAIN" ["ifdescription"]=> int(0) ["ifid"]=>
int(0) ["lines"]=> int(4) ["bytes"]=> int(18) ["ifdisposition"]=> int(0)
["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=>
array(2) { [0]=> object(stdClass)#14 (2) { ["attribute"]=> string(7)
"charset" ["value"]=> string(12) "windows-1252" } [1]=>
object(stdClass)#16 (2) { ["attribute"]=> string(6) "format" ["value"]=>
string(6) "flowed" } } }
mimetype=TEXT/PLAIN
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mail attachment Jan Novak <repcom@gmail.com> - 2014-10-21 15:14 +0200
Re: mail attachment Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-22 20:42 +0200
Re: mail attachment Jan Novak <repcom@gmail.com> - 2014-10-23 08:43 +0200
Re: mail attachment Chuck Anderson <cycletourist@invalid.invalid> - 2014-10-23 23:59 -0600
Re: mail attachment Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-24 11:21 -0400
Re: mail attachment Jan Novak <repcom@gmail.com> - 2014-10-27 09:23 +0100
Re: mail attachment Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-27 14:16 -0400
Re: mail attachment Jan Novak <repcom@gmail.com> - 2014-10-28 11:58 +0100
Re: mail attachment Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-28 08:21 -0400
Re: mail attachment Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-27 16:44 -0400
Re: mail attachment Jan Novak <repcom@gmail.com> - 2014-10-28 14:16 +0100
SOLVED: mail attachment Jan Novak <repcom@gmail.com> - 2014-10-28 14:25 +0100
Re: SOLVED: mail attachment Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-28 09:35 -0400
Re: mail attachment Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-23 06:07 -0400
csiph-web