November 15, 20169 yr 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, 20169 yr by garybpw
November 15, 20169 yr 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.
November 16, 20169 yr Author Thanks for this Ben. That worked. I notice that the email in Sent shows up as unread. Is there a way to prevent that?
November 16, 20169 yr 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.
June 30, 20178 yr 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
July 3, 20178 yr 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"
Create an account or sign in to comment