Hello
I'm using wwwipstuff.dll for sending mails by a VFP 9 application. By trying to add a PDF-attachement to the mail message, Iireceive following message, when i start the program with a user with restricted system rights:
*** MAIL SENDING FAILED: -1 - Couldn't create temp file for encoding
I do not completely understand, how the sendmail-method works. Does it create somewhere a temporarly file for streaming the PDF-file into the mail message?
Many thanks in advance for your help!
What are you doing exactly? What version are you using what mechanism? There are a number of ways that you can send email. Please post your code (hiding any sensitive info).
That said attachments are just read directly from the source files you specify unless you're using Mapi mail in which case it's MAPI that's doing it. If you're using the .NET Component it might be doing some internal encoding, but I'm not sure. Those are core system features.
All this aside, whatever your user rights are you pretty much need to have access in the temp folder - if that's not there I think you have bigger issues as a lot of FoxPro stuff won't work.
+++ Rick ---
Hi Rick, thanks for your answer. The code looks like this (removed unnecessarily code). Just VPF stuff - no .net:
omail = Createobject('wwipstuff')
omail.cUserName = Alltrim(lcsmtpuser)
omail.cPassword = Alltrim(lcsmtppassword)
lcAttachment = Fullpath(llcAttachment)
llantw = omail.sendmail(lcMailServer, lcSenderName, lcSenderEmail, ;
lcRecipient, lcCCListsendmail, lcSubject, lcMessage, ;
lcAttachment, lcBCCList, lcContentType, lcAlternateText, lcLogFile)
I'm using the wwipstuff.dll version 7.0.0.0. The user has read/write rights in the source folder from the attachement (pdf). I'm just wondering, where does the error "Couldn't send create temp file for encoding" comes from. Whicht temp file? For what enconding?
Thanks in advance!
Hi Peter,
Hmmm... you're using Client Tools 7.0? In that case the wwipstuff
class shouldn't be used or even be working as we no longer ship it - if you're really using wwIPStuff
then you're using an old version of something.
You should be using the wwSmtp class. It works in either Win32 mode or .NET Mode with the latter being more reliable as it delegates to system services.
Note that wwSmtp
has the same signature as the old wwipstuff class, but some time ago all the varied functionality in wwIPStuff was broken out into dedicated classes with the interface maintained for the most part. wwSmtp still has a Win32 based version that doesn't rely on .NET although I would recommend using the .NET version for better performance and reliability and you have to use it if you want to send SSL based messages.
Please try with that class first and then report back what you get. Here's more info from the documentation:
+++ Rick ---