1 andyaye May 20, 2010 05:40
3 yabba May 20, 2010 17:47
If there's no 533 || 579 in /cron/getmail.php then you have a corrupt file ;)
/cron/getmail.php lines 530 -> 580
// TODO: handle type == "message" recursively
// mail is html
if( $parsedMIME['Type'] == 'html' ){
foreach ( $parsedMIME['Alternative'] as $alternative ){
if( $alternative['Type'] == 'text' ){
echo_message( 'HTML alternative message part saved as ' . $alternative['DataFile'], INFO, 3 );
$strbody = imap_qprint( file_get_contents( $alternative['DataFile'] ) );
break; // stop after first alternative
}
}
}
// mail is plain text
elseif( $parsedMIME['Type'] == 'text' )
{
echo_message( 'Plain-text message part saved as ' . $parsedMIME['DataFile'], INFO, 3 );
$strbody = imap_qprint( file_get_contents( $parsedMIME['DataFile'] ) );
}
// Check for attachments
if( isset( $parsedMIME['Attachments'] ) && count($parsedMIME['Attachments']) )
{
$hasAttachment = true;
foreach( $parsedMIME['Attachments'] as $attachment )
{
echo_message( 'Attachment: ' . $attachment['FileName'] . ' stored as ' . $attachment['DataFile'], INFO, 3 );
}
}
$warning_count = count( $mimeParser->warnings );
if( $warning_count > 0 )
{
echo_message( '✘ ' . $warning_count . ' warnings during decode: ', WARNING, 2 );
foreach ($mimeParser->warnings as $k => $v)
{
echo_message( '✘ ' . 'Warning: ' . $v . ' at position ' . $k, WARNING, 3 );
}
}
}
unlink( $tmpMIME );
// var_dump($strbody);
// process body. First fix different line-endings (dos, mac, unix), remove double newlines
$strbody = str_replace( array("\r", "\n\n"), "\n", $strbody );
$a_body = explode( "\n", $strbody, 2 );
// tblue> splitting only into 2 parts allows colons in the user PW
$a_authentication = explode( ':', $a_body[0], 2 );
$content = trim( $a_body[1] );
Are you sending your emails as html or plain-text ?
¥
4 yabba May 20, 2010 17:52
Ack, just read the code, you're sending as html and it's *possibly* a bug.
Change this section of that code ( lines 532 -&& 533 )
// mail is html
if( $parsedMIME['Type'] == 'html' ){
To :
// mail is html
if( $parsedMIME['Type'] == 'html' && isset( $parsedMIME['Alternative'] ) ){
and 543 -> 544 from :
// mail is plain text
elseif( $parsedMIME['Type'] == 'text' )
to :
// mail is plain text
elseif( $parsedMIME['Type'] == 'text' || !isset( $parsedMIME['Alternative'] ) )
¥
5 andyaye May 21, 2010 00:32
Thanks..
I changed the email sending client which had a tab for text
and it reports success.
I have unticked the "test" box and updated..
but it still reports that it is in test mode
You configured test mode in the settings or set $test to 2. Nothing will be posted to the database/mediastore nor will your inbox be altered.
where is the setting to have it post?
and could you advise where the setting is for it to check for email postings?
Is that in the test setting? such as once a day?
-------
second,
I made the changes above, and tried html..
now it fails at 578 where it tries to explode from the colon..
I gave up on waiting for a solution and just deleted everything I had and started over.
3.3.3 is running.. but post by email still will not accept the
username:password
it gives this message
Notice: Undefined index: Alternative in /users/web/andyaye/web/blogs/cron/getmail.php on line 533
Warning: Invalid argument supplied for foreach() in /users/web/andyaye/web/blogs/cron/getmail.php on line 533
Notice: Undefined offset: 1 in /users/web/andyaye/web/blogs/cron/getmail.php on line 579
Authentication failed for user .
in getmail.php there is no line 533 or line 579
it gets the emails, but craps out because of the
username:password
help would be appreciated
thanks