howto delete an attachment / part - WeOnlyDo Discussion board

howto delete an attachment / part (wodSmtp)

by LOGO Datensysteme, Thursday, June 01, 2006, 13:38 (6532 days ago)

Hi,
just testing on wodSMTP and find it more than useful, but stuck on the following scenario:

- New Message
- attaching 1 file (works great)
- attaching one more file (works great as well)
- rethinking my doing and want to delete first attachment

well.... and now?

I have object.message.part.add , but not a .part.delete
or something else. I cannot reduce the .part.count or something
else...

Is this really a one-way-ticket? Add-and-forget?

I think it's most reasonable to reconsider a message and
want to correct it. As you put it in your help. For mails
which can be sent more often just change the .to and
resend it. But what if i have 'built' a quite complex mail with
several attachments and not all of the adressees shall get
all of my attached files. Do i really have to rebuild the
mail from scratch?

Any great ideas or suggestions on this?
Perhaps i am just missing something very obvious and simple...

Thanks alot
Regards
Michael
plain simple.

Re: howto delete an attachment / part

by wodSupport, Thursday, June 01, 2006, 14:08 (6532 days ago) @ LOGO Datensysteme

Michael,

nope, you can't. wodSmtp cannot edit messages. You can only add it and send it.

If you think that you may reconsider, you shouldn't add things in the first place, right? For example, in your app, if you think users may change their mind, then don't add attachments at all - keep them in some other buffer (for example, only their names) which is editable, and then before calling SendMessage just add them.

Hope I helped.
Kreso

Re: howto delete an attachment / part

by LOGO Datensysteme, Thursday, June 01, 2006, 14:22 (6532 days ago) @ wodSupport

Yepp,

i thought it would end up like this [:wink:]

Obviously i was just too lazy, because a attach
the files when the users select one file at a time.
Then i re-read the .parts... for the filenames
to be added to a dropdown of attached-files.
With this i always have a consistent status of
the actual wanted email to be sent.

If the user hits send it , i just have to
call for .sendmessage and ready-we-go...

I'm gonna change it to a fullpath-to-file in the
dropdown and actually attach it when really sent.

You were right, but mine needs much less code [:happy:]

Thanks for your quick answering.

Want to have the VisualFoxpro Form as a sample for
your SMTP distrib? It's ready-to-use with not much
overhead and can be run directly in the VFP-IDE
without hassle.

Best regards and have a nice one

Michael

Re: howto delete an attachment / part

by wodSupport, Thursday, June 01, 2006, 14:47 (6532 days ago) @ LOGO Datensysteme

Michael,

yeah, sure, I'm always happy to see new samples!

Thanks,
Kreso