Any other PHP developers out there? -> IMAP question

Dan

Kim Jong Dan
Staff member
Administrator
Tipping Member
Hi all,

I am currently developing an IMAP application. What I am trying to figure out without any resounding success is how to send a mail to INBOX.Sent at the same time as sending it.

I can try BCC the email to myself then set up a "rule" to move it when it is found but that seems kind of long winded.

Any ideas?

cheers
Danny
 
Indivisual Military Appreciation Process on the net??

Wow, but the one thing that gets me is where do i log in, last time i was in the bush there were too many internet cafes
 
no thanks to you guys i figured it out using IMAP_append()

Code:
<?php
$stream = imap_open("{your.imap.host}INBOX.Sent", "username", "password");

$check = imap_check($stream);
echo "Msg Count before append: ". $check->Nmsgs . "\\n";

imap_append($stream, "{your.imap.host}INBOX.Sent"
                   , "From: [email protected]\\r\\n"
                   . "To: [email protected]\\r\\n"
                   . "Subject: test\\r\\n"
                   . "\\r\\n"
                   . "this is a test message, please ignore\\r\\n"
                   );

$check = imap_check($stream);
echo "Msg Count after append : ". $check->Nmsgs . "\\n";

imap_close($stream);
?>
 
no thanks to you guys i figured it out using IMAP_append()

Code:
<?php
$stream = imap_open(\"{your.imap.host}INBOX.Sent\", \"username\", \"password\");

$check = imap_check($stream);
echo \"Msg Count before append: \". $check->Nmsgs . \"\n\";

imap_append($stream, \"{your.imap.host}INBOX.Sent\"
                   , \"From: [email protected]\r\n\"
                   . \"To: [email protected]\r\n\"
                   . \"Subject: test\r\n\"
                   . \"\r\n\"
                   . \"this is a test message, please ignore\r\n\"
                   );

$check = imap_check($stream);
echo \"Msg Count after append : \". $check->Nmsgs . \"\n\";

imap_close($stream);
?>

Well I'll sure sleep better now knowing that problem has been solved

Now what do we do about global warming........................ :lol: :lol:
 
Global warming can be solved in 1 of 3 ways

1 - We build a giant fan!
2 - We build a giant airconditionar
3 - Everyone in the world leaves their fridge and freezer doors open for 1 day every month.

that should cool things down a bit
 
see now your on a roll

try manlys centre problems next, theres a challenge worthy of your skills
 

Users who are viewing this thread

Latest posts

2025 Ladder

Team P W D L PD Pts
1 Raiders 16 13 0 3 104 28
2 Bulldogs 15 11 0 4 92 28
3 Storm 14 10 0 4 196 26
4 Warriors 15 10 0 5 11 26
5 Broncos 16 9 0 7 68 22
6 Panthers 15 7 1 7 3 21
7 Dolphins 16 8 0 8 162 20
8 Roosters 14 7 0 7 16 20
9 Sharks 16 8 0 8 -4 20
10 Sea Eagles 15 7 0 8 40 18
11 Dragons 14 6 0 8 -45 18
12 Cowboys 15 6 1 8 -134 17
13 Knights 16 6 0 10 -67 16
14 Eels 15 5 0 10 -103 16
15 Tigers 15 5 0 10 -84 14
16 Rabbitohs 16 6 0 10 -111 14
17 Titans 15 4 0 11 -144 14
Back
Top Bottom