Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Any other PHP developers out there? -> IMAP question

Dan

Kim Jong Dan
Staff member
Administrator
Tipping Comp 2021
Joined
Jul 15, 2004
Messages
36,672
Reaction score
12,870
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
 

Fro

First Grader
Joined
Jul 15, 2004
Messages
8,436
Reaction score
323
no takers??

Sorry Dan looks like everyone else has a life :)
 

Dan

Kim Jong Dan
Staff member
Administrator
Tipping Comp 2021
Joined
Jul 15, 2004
Messages
36,672
Reaction score
12,870
lol.

Its this or do real work!
 

Fro

First Grader
Joined
Jul 15, 2004
Messages
8,436
Reaction score
323
I'm the same way, and after all it is a friday
 

Fluffy

Journey Man
Joined
Nov 12, 2004
Messages
21,163
Reaction score
7,854
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
 

Dan

Kim Jong Dan
Staff member
Administrator
Tipping Comp 2021
Joined
Jul 15, 2004
Messages
36,672
Reaction score
12,870
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: me@example.com\\r\\n"
                   . "To: you@example.com\\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);
?>
 

Dan

Kim Jong Dan
Staff member
Administrator
Tipping Comp 2021
Joined
Jul 15, 2004
Messages
36,672
Reaction score
12,870
arrrrggghh code looksugly here
 

Fro

First Grader
Joined
Jul 15, 2004
Messages
8,436
Reaction score
323
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: me@example.com\r\n\"
                   . \"To: you@example.com\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:
 

Dan

Kim Jong Dan
Staff member
Administrator
Tipping Comp 2021
Joined
Jul 15, 2004
Messages
36,672
Reaction score
12,870
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
 

Fro

First Grader
Joined
Jul 15, 2004
Messages
8,436
Reaction score
323
see now your on a roll

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

Latest posts

Team P W L PD Pts
15 13 2 344 26
15 13 2 311 26
14 11 3 105 24
14 11 3 176 22
14 9 5 122 20
13 7 6 33 16
15 7 8 -11 14
14 6 8 -44 14
14 6 8 -121 14
14 5 9 -66 12
14 5 9 -70 12
15 6 9 -131 12
14 5 9 -62 10
15 5 10 -132 10
13 2 11 -204 6
15 3 12 -250 6
Top Bottom