surion Posted March 9, 2007 Share Posted March 9, 2007 like the subject says, after sending a mail, the mail goes into the sentbox perfectly this is what i do: if(!$mail->Send()) { echo _YOUR_EMAIL_WAS_NOT_SENT . "<br>" . $mail->ErrorInfo; include('newmessage.php'); } else { echo _YOUR_EMAIL_WAS_SENT_SUCCESSFULLY . "<br><br>"; $header = $mail->CreateHeader(); $body = $mail->CreateBody(); //this CreateHeader & CreateBody are phpMailer functions include('mailconnect.php'); imap_append($stream,"{name_OF_MY_MAILSERVER.net}INBOX.Sent", "$header\r\n" . "$body\r\n");// imap_close($stream); include('inbox.php'); } as you can see, after phpMailer did his job (sending the mail), i make my own connection to my mailserver, and i store the message into the Sent box, but it goes in there AS UNREAD, is there a way, to make that it gets inthere AS READ, is that addable to the imap_append function or not? if not, is there another way? scanning ALL MAILS IN SENTBOX and marking all as read using imap_setflag_full, can't be a good way i think sry for my bad english, and thx for any suggestions that might help me Link to comment https://forums.phpfreaks.com/topic/41968-solved-after-sending-mail-mail-goes-into-sentbox-but-is-stored-there-as-unread/ Share on other sites More sharing options...
surion Posted March 9, 2007 Author Share Posted March 9, 2007 oh lol, i found it already, seemed to be easier than i tought, this solved my problem: imap_append($stream, "{name_OF_MY_MAILSERVER.net}INBOX.Sent", "$header\r\n" . "$body\r\n", "\\Seen"); i just added the \\seen flag to the end of function hope i can help somebody else with this too Link to comment https://forums.phpfreaks.com/topic/41968-solved-after-sending-mail-mail-goes-into-sentbox-but-is-stored-there-as-unread/#findComment-203476 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.