Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8557547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:35:53+00:00 2026-06-11T15:35:53+00:00

I want to append a message to a imap sentbox – the code below

  • 0

I want to append a message to a imap sentbox – the code below does just that however treats the message as new.

From my understanding adding the SEEN option should mark it as read however I’ve tried every possible location for the option but still messages are marked as new.

Having looked at imap_setflag_full, this requires a mail number to set the flag and given that the email has just been added, I see no way to grab the number to set the flag(?).

Any suggestions?

 imap_append($inbox, "{mail.domain.com:143/imap/notls}INBOX.Sent"
                       , "From: $fromaddress\r\n"
                       . "To: $toaddress\r\n"
                       . "Subject: [Email Processed] $subject\r\n"
                       . "Date: $date_return  \r\n"
                       . "X-Mailer: Cmail_v2.0 \r\n"
                       . "X-Originating-IP: {$_SERVER['REMOTE_ADDR']}\r\n"
                       . "MIME-Version: 1 \r\n"
                       . "Content-Type: text/html;\r\n\tcharset=\"ISO-8859-1\"\r\n"
                       . "Content-Transfer-Encoding: 8bit \r\n"
                       . "\r\n\r\n"
                       . "$message_return \r\n"
                       );
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:35:55+00:00Added an answer on June 11, 2026 at 3:35 pm

    Pass your flags through the $options argument.

    http://php.net/manual/en/function.imap-append.php#74907

    The last argument, $options, are flags like for use with
    imap_setflag_full.

    EDIT:
    After reading your post again, I realized that you might already be passing the flag through the $options parameter. That’s good, but if you are passing “SEEN” then that is your problem. The IMAP4 RFC: Section 2.3.2. Flags Message Attribute defines it as “\Seen” with a backslash and capital S. Does that flag string fix your problem?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to copy a message from one IMAP server to another IMAP server.
what's wrong with that? $('body').append(<div class='message success'>Upload successful!</div>); $('.message').delay(2000).remove(); I want to append a
I want to append .item element before .content element but it just simply removes
I have an image that I append a message to inside the NSData of
I want to send a message to my computer from my phone using TCP..My
I want to write a python module that sends data to a draft message
Here is my code. You have to kindly look does it suffer from 'same
i want to append unlimited number of HTML elements with data given as comment.
I want to append a div inside a div which have many divs inside
I want to append a record in a TClientDataSet based on another record (in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.