February 10, 201510 yr Newbies We are creating an SMTP and IMAP connection to send an email that has attachments. In the end we call EmailMoveCurrentMessage to move the message to the 'Sent Items' Folder. We can see the message appear in the Sent Items Folder, however the attachment is not always included in the resulting message in the Sent Folder. I can't seem to figure out what makes the difference.
February 10, 201510 yr I just tested this out myself and I was able to move a sent message into the sent folder and have it show up with attachment. What exactly is the order you're calling the plugin functions in? Is the attachment properly coming through on the receiving side? Is the email plugin throwing any errors?
February 10, 201510 yr Author Newbies We are using version 2.0.1 of the plugin. The issue seems to be with mac and PC. We are testing with an office365 mailbox I don't see any errors being thrown. The attachment is coming across to the recipient, just not the sent folder. I am connecting to both SMTP and IMAP EmailConnectSMTP() // This is in a set variable by it self. EmailConnectIMAP() // This is in a set variable by it self. // Then I Create the message EmailCreate($SmtpUserName ; Activities::To ; Activities::Subject ) and EmailCCRecipients( Activities::Cc ) and EmailBCCRecipients( Activities::Bcc ) and EmailSetBody(Activities::Text ) and EmailMoveCurrentMessage( "Sent Items" ) //// All of this is one variable set. // Then I loop through a portal to attach documents. EmailAttachFile( docs_Activities_New::PathToAttachment ) // Then I send EmailSend
February 10, 201510 yr Author Newbies Okay, I think I got this figured out... Instead of calling EmailMoveCurrentMessage with the EmailCreate, I have moved it to the EmailSend and now it seems to be better. so it is like this now... EmailConnectSMTP() // This is in a set variable by it self. EmailConnectIMAP() // This is in a set variable by it self. // Then I Create the message EmailCreate($SmtpUserName ; Activities::To ; Activities::Subject ) and EmailCCRecipients( Activities::Cc ) and EmailBCCRecipients( Activities::Bcc ) and EmailSetBody(Activities::Text ) //// All of this is one variable set. // Then I loop through a portal to attach documents. EmailAttachFile( docs_Activities_New::PathToAttachment ) // Then I send EmailSend () and EmailMoveCurrentMessage( "Sent Items" ) The demo file showed it as part of the Create, but it does seem to work better this way. THANKS for your help!
February 10, 201510 yr Ah, yeah, that would do it. The EmailMoveCurrentMessage function moves the message as currently in memory to the destination folder, and any changes after moving it won't affect the moved version. I'm glad you figured it out!
Create an account or sign in to comment