Clear Attachments from previous email - WeOnlyDo Discussion board

Clear Attachments from previous email (wodSmtp)

by Scott Robinson, Wednesday, December 16, 2020, 22:54 (1436 days ago)

I am doing something like this with the wodSMTP component:

Login once

Send multiple emails to different email addresses

Logout

The problem is, if the first email has an attachment added (using the wodSMTP.Message.Attach), then any email after that contains the same attachment, which I do not want.

Is there a way to clear the previous attachments without clearing out the whole wodSMTP object and not doing a Logout?

Thanks in advance for your help!

Clear Attachments from previous email

by wodSupport, Wednesday, December 16, 2020, 23:38 (1436 days ago) @ Scott Robinson

Hi.

You don't have to clear whole wodSmtp object, but you can only recreate message without Disconnecting using CreateSimple (or similar method)

You cannot just remove the attachment in wodSmtp.

Regards,
Jasmine

Clear Attachments from previous email

by Scott Robinson, Thursday, December 17, 2020, 14:50 (1435 days ago) @ wodSupport

Hi.

You don't have to clear whole wodSmtp object, but you can only recreate message without Disconnecting using CreateSimple (or similar method)

You cannot just remove the attachment in wodSmtp.

Regards,
Jasmine

We are using wodsmtp.Message to have many different options like Carbon Copy, Blind Copy, custom Headers, Read Receipts, etc. Can CreateSimple or CreateSimpleAttachment handle these types of options as well?

Clear Attachments from previous email

by wodSupport, Thursday, December 17, 2020, 14:51 (1435 days ago) @ Scott Robinson

Hi.

You can set them from your code. If you use some function to set all of those after initial message is created, it would mean just calling same function again after CreateWithAttachment and then later on CreateSimple, or similar.

Jasmine