Using smtpmailv5_7a.p

Hi All

Has anyone used this utility?

I am running 9.1E under Windows XP Pro. It works brilliantly except when I try and attach an Excel spreadsheet. When trying to open the attached spreadsheet on receipt of the email I get a message saying '<file name> cannot be accessed. The file may be read only or you may be trying to access a readonly location. Or the server the document is on may not be responding'. If I right-click and save-as, then try and open the spreadsheet from wherever I save it, I get the same message.

Note I can successfully send and open a plain text file attachment.

Any suggestions would be great.
Cheers
 
I've used smtpmail (an earlier version) plenty of times with no problems. However, I've never sent Excel files.

I assume you have set the filetype/attachment parameters exactly as they should be for Excel (I don't know if 'binary' is acceptable)?

There is by the way a testing program on FreeFrameWork you can play around with to try the various options.

===

However, it may be that smtpmail is not your problem. I have come across issues before where Excel and other files that have been saved on network drives cannot be opened when transferred across the network, throwing the error you have described.

If this is the problem (which you could test very simply by trying to copy the source file across the network via Windows and opening it), it's an MS bug, and the only workaround I know (apart from installing the relavent patches) is to save the original file on a non-shared drive before sending it via smtpmail.

Of course, that may be a complete red herring, in which case you'll have to experiment more with the aforementioned parameters.

I can't tell you exactly what the charset/filetype/etc. should be for your version of Excel.

No doubt Google can.

HTH
 
Thanks Lee,

I have tried just sending the same Excel file via Outlook and can happily open it at the receiving end.

I have also, as you suggest, tried sending via SMTP from a local drive which produces the same problem.

If I look at the header of the message send via SMTP that can't be opened and the one via Outlook that can, they both look pretty much the same.

I will head down the charset/filetype route and see where that gets me. And also check out the testing tools on FreeFrameWork.

Cheers
Chris
 
Problem solved Lee!

Seems I wasn't reading the documentation properly. RTFM....

The two attachment parameters are "Attachments" and "Local Files", my problem was that I was including the path in the Attachments parameter.

Wrong:
Attachment='c:\mydocuments\test.xls:type=application/data:filetype=binary'
LocalFile='c:\my documents\test.xls'

Should be:
Attachment='test.xls:type=application/data:filetype=binary'
LocalFile='c:\my documents\test.xls'

Thanks for you help.
Cheers
Chris
 
Top