Good afternoon Rick
I am using SMTP in the current Internet & Client Tools version. When you AddAttachment("XXXX, YYYY") then SendMail throws a -1 error saying it cannot find the file " YYYY". It would appear the comma is treating the parameter as a file list.
Not sure if there is workaround. Thanks.

Ugh, sorry for the delay - I had previously replied but didn't actually send the message. Duh.
IAC, there's no workaround short of stripping out the comma from the file name before sending.
+++ Rick ---
Thanks for getting back. OK hoping maybe some day you might have a look since AddAttachment is used to add a single file and Windows does allow a comma in the file name. We can strip out the comma if the file is created thru our app but cannot do nothing if the user opens a dialog to select a file previousy created.
The problem is that there are only a few characters that Windows doesn't allow for filenames and adding a list as string always needs an exclusion character.
The way to do this right would be to use an AddAttachment()
method and create a collection that can be passed up to the .NET component. That would only work with the .NET component though not the classic wwIpstuff mail bits...
+++ Rick ---

Actually - ha ha - I'd already done this.
You can use loSmpt.AddAttachment() which directly attaches .NET attachment objects and that should work with ,
in the filename - as long as the file name is valid it should work.
Note that this only works in .NET mode (.nMailMode = 0
) - the old wwIPstuff version continues to use the comma delimited list even when you use this method (ie. it build a string).
+++ Rick ---
OK thanks. So .NET mode is the workaround for file name containing a comma when using ADDATTACHMENT(). Actually .NET mode should be the preferred mode so not really a workaround in that sense. Great to know.
Well the documentation has cAttachment
removed, although it's still in the file and the recommendation is to use AddAttachment()
regardless of whether .NET is used or not (although nMailMode=2
will still fail with ,
).
+++ Rick ---