Gary Reimer Posted November 15, 2016 Posted November 15, 2016 (edited) Hello; I've been trying to save a sent email to the Sent folder, but the EmailMoveCurrentMessage ( "Sent" ) step fails. The email is sent but is not moved to the Sent mailbox. I get a result of 0. Here's my code: EmailRegister( "xxxxxxxxx"; "me_customer ) and EmailConnectSMTP( "mail.myserver.com"; "me@my_address.com"; "password" ) and emailquicksend ( "me@my_address.com ; "[email protected]" ; "Hello" & Get ( CurrentTime ) ; "this is a test" ) and emailmovecurrentmessage ( "Sent" ) Thanks for any help available, Gary Edited November 15, 2016 by garybpw
Ben360Works Posted November 15, 2016 Posted November 15, 2016 You will need to be connected to your inbound mail server when you make the call to EmailMoveCurrentMessage. So you could call EmailConnectIMAP after your call to EmailConnectSMTP.
Gary Reimer Posted November 16, 2016 Author Posted November 16, 2016 Thanks for this Ben. That worked. I notice that the email in Sent shows up as unread. Is there a way to prevent that?
Ben360Works Posted November 16, 2016 Posted November 16, 2016 You should be able to do this by calling EmailReadMessages after you move the message, and pass in the flags "mailbox=Sent" ; "viewed=false" ; "readonly=false". This should mark any unread messages as viewed in the 'Sent' mailbox.
JerrySalem Posted June 30, 2017 Posted June 30, 2017 I am trying to do this same task. Using the new Plugin script steps, I can only set two flags. I am getting around that by doing it 'old school' and setting a variable to EmailReadMessages( "mailbox=Sent" ; "viewed=false" ; "readonly=false"). Is there a way to use the script step and do this? Also; this seems like it will not the right way to do it. I really don't want to set ALL of the messages as read. Only the one current message should be set to read. Is there a way I can do this? TIA Jerry
ryan360Works Posted July 3, 2017 Posted July 3, 2017 Hi Jerry, Unfortunately since EmailReadMessages has a variable number of parameters, it can not be properly set up to be called as a script step (although you could use it if you only have two flags to set). To set the current message to "read" , remove the "readonly=false" parameter and add the function EmailMessageSetFlag inside your loop and pass in the parameter "viewed"
Recommended Posts
This topic is 2790 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now