problem with DefaultFilename and SendByMail property

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
Deurges
Posts: 7
Joined: Fri Jan 24 2003

problem with DefaultFilename and SendByMail property

Post by Deurges »

Hi,
I want to send the pdf document directly by Email. It seems so that the DefaultFileame-Property doesn't work with the SendByMail-Property.
If I create the document on the filesystem and use the function sendmail, then it works.

Is there a possibility to use the SendByMail- and DefaultFilename-property?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

If you want to send a pdf file by e-mail you can either use the SendMail function to send the pdf after it is generated or you can add the 'Send PDF by Mail' thag to the FileNameOptions call.

If you want more details about the second method please check our users manual 'Amyuni PDF Converter.pdf' or send an e-mail to support@amyuni.com (unfortunately I don't have sample code right now to post it here, maybe later on when you make this work you can post the code you used 8) )
Last edited by Joan on Fri Jan 31 2003, edited 1 time in total.
Deurges
Posts: 7
Joined: Fri Jan 24 2003

Post by Deurges »

Hello,
when I use the SendMail function I get an abnormal end.

(The statement in "0 x77ead7e1" refers to memory in "0 x0000000f". The process "read" couldn't be executed on the memory.)

When I add the 'send PDF by Mail' thag to the FileNameOptions the mail is created correctly.
The problem is that the file name cannot be provided.
I deposit the DefaultFileName and add the UseFileName thag to the FileNameOptions.
It doesn't work. I always get Filenames like this: PDFA.pdf; PDFB.pdf
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hi,

I didn't really understand what you mean by:
When I add the 'send PDF by Mail' tag to the FileNameOptions the mail is created correctly.
The problem is that the file name cannot be provided.
If you want to add the Send PDF by Mail tag to the FileNameOptions than you need to use some additional functions of the DLL to specify the To, CC, message, subject, and file name to be used.

These functions are:

int WINAPI SetEmailFieldCC( HANDLE hIntf, LPSTR szEmailFieldCC)
FAILURE 0
SUCCESS 1
int WINAPI SetEmailFieldBCC( HANDLE hIntf, LPSTR szEmailFieldBCC)
FAILURE 0
SUCCESS 1
int WINAPI SetEmailSubject( HANDLE hIntf, LPSTR szEmailSubject)
FAILURE 0
SUCCESS 1
int WINAPI SetEmailMessage( HANDLE hIntf, LPSTR szEmailMessage)
FAILURE 0
SUCCESS 1
int WINAPI SetEmailPrompt( HANDLE hIntf, BOOL fEmailPrompt)
FAILURE 0
SUCCESS 1


Sending the pdf by e-mail using the SendMail() function should work. Let me give you more details that can help you.

1 - Please check that you mail application uses MAPI and that you have an updated Mapi.h on your system. (If you have Outlook Express 5 than you must have an appropriate Mapi.h file).

2 - Please check that you have only one version of CDintf on your system (the latest one) and re-register it using Regsvr32.

3 - When calling the SendMail function please check that the pdf file is already generated. The SendMail() function sends a pdf file, that already exists on your system, by e-mail.

4 - The File Name parameter of the SendMail function should a string of the form:
"C:\Temp\MyPDF.pdf;MyDocument.pdf"

'MyPDF.pdf' is in this case the file you generated from printing your original document to the PDF Printer and 'Document.pdf' is the name of the pdf file as it will appear in the attachement.

I checked the code you posted to your other post and I noticed that you are using a comma ',' instead of a semicolon ';'. And if you are still facing problems you may try to specify the full path of the pdf file.

5 - Finally, you can try to use our latest version 2.08b of the PDF Converter available to our site, knowing that 2.08a that you are currently using doesn't have any known issues with the SendMail function.

Hope this helps, if it did please post the solution you used to your other post in this forum, if it didn't please send an e-mail to support@amyuni.com so they can check this more thoroughly.

Have a nice day !
Post Reply