ptonev.com
November 21, 2017, 07:24:00 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: subject of email  (Read 20125 times)
ptonev
Administrator
Newbie
*****
Posts: 135


3119712
View Profile WWW
« Reply #15 on: October 07, 2004, 08:48:28 pm »

Hummmm,

Now I test is and all work fine.

When I send 1 email I received this:

[1 - test 1], []
[N - xxx], []

where N is email count and xxx is subject.

Then I send 2 new email and received this:
[2 - test 2, test 3], []

all is ok for me...

check __mnotify_check_mail function:
Code:

function __mnotify_check_mail($host, $port, $user, $pass, $email_old)
{
$read_header = true;
$email_count = 0;
$email_first = 1;
$email_list  = "";

// open mailbox
$mbox = imap_open("{".$host.":".$port."/pop3/notls}INBOX", "$user", "$pass");

if($mbox === false)
{
return false;
}

// get emial count
$email_count = imap_num_msg($mbox);

// find & calc new emails
if($email_old == 0)
{
}
elseif($email_count > $email_old)
{
$email_first = $email_old + 1;
}
else if($email_count < $email_old)
{
}
else
{
$read_header = false;
}

if($read_header)
{
// get emails header
for ($i = $email_first; $i <= $email_count; $i++)
{
$header = imap_headerinfo($mbox, $i, 1024, 1024);
$fetchsubject = $header->fetchsubject;

$sep = (strlen($email_list) > 0)? ", ": "";
$email_list = $email_list.$sep.$fetchsubject;
}
}

// close mailbox
imap_close($mbox);

// return data
if($email_list != "")
{
return array($email_count, $email_list);
}
else
{
return $email_count;
}
}


best regards,
Logged
Patches
Guest
« Reply #16 on: October 17, 2004, 12:22:29 pm »

Well I kinda got it working..  The problem I am having now is the message send routine is only sending 32 characters no matter what.    

So if I have a few messages,   I typically only get the first subject.   :-(
Logged
ptonev
Administrator
Newbie
*****
Posts: 135


3119712
View Profile WWW
« Reply #17 on: October 21, 2004, 12:54:51 am »

Hi,

> The problem I am having now is the message send routine is only sending 32 characters no matter what.

I don't understand you.

> So if I have a few messages, I typically only get the first subject. :-(

Strange, I received all.

Example - this is a subject of text. Here is a 3 messages with long site:
Subject: 3 - Nepoznat GSM: SEC-SGHP510/1.0 UP.Browser/6.2.2.6 (GUI) MMP/1.0, Nevalidna zaiavka. Greshen WAP key: , Nevalidna zaiavka. Greshen WAP key:

best regards,
Logged
Patches
Guest
« Reply #18 on: October 21, 2004, 03:30:19 am »

Lets do it by example:

Lets say I get this message into my mailbox

From: bob@jones.com
Subject: What are you going to do for dinner tonnite?

Well what will come across throught the program is this:

1 - What are you going to do for dinner t

Then lets say I get the above message and another message:

From: bob@jones.com
Subject: What are you going to do for dinner tonnite?

From: Janet@business.com
Subject: Here is your report
             
Well now all I will get is:

2 -  What are you going to do for dinner t

Now if the same above two messages come into the mailbox in reverse order then I get:

2 - Here is your report, Wha

As you can see I only get 32 characters no matter what.  At first I thought it was cell phone provider,  so I tested by pointing the program to regular email address.  Same thing happens.   I dont see anything in the script that should be parsing the values,  but I do not know php that well.
Logged
ptonev
Administrator
Newbie
*****
Posts: 135


3119712
View Profile WWW
« Reply #19 on: October 21, 2004, 08:15:34 am »

Hi,

let make test.

Send email on test [put here correct char]ptonev[put here correct char]com

On URL you can see what script must be send:

http://www.ptonev.com/test1/phpIMAPMailNotification.php

I test and all work fine.
Logged
Patches
Guest
« Reply #20 on: November 03, 2004, 12:59:19 pm »

Sorry I was gone for a couple weeks...

Anyways,  it must be something with my server....  

Cause no matter what I do, the above happens....
Logged
ptonev
Administrator
Newbie
*****
Posts: 135


3119712
View Profile WWW
« Reply #21 on: November 03, 2004, 06:54:22 pm »

hi,

read my previous posting and try/test it.
Logged
Patches
Guest
« Reply #22 on: November 10, 2004, 03:10:41 pm »

Well I figured it out..  Neither one of us is crazy.

I have SprintPCS cell phone service here in the US.  I am sending the messages to my cell phone.  Well Sprint had decided to parse text messages sent via email.  If I go in and read the actual email before its sent to my phone as a text message its completely there.   Thanks for all your help

Patches
Logged
ptonev
Administrator
Newbie
*****
Posts: 135


3119712
View Profile WWW
« Reply #23 on: November 11, 2004, 08:19:18 am »

> Thanks for all your help

I hope that can help you.
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!