Print Page | Close Window

Convert2Pdf - why is it sending email?

Printed From: www.exp-systems.com
Category: PDF reDirect
Forum Name: Programming
Forum Discription: VBA and Batch Tools to control PDF reDirect Pro
URL: http://www.exp-systems.com/Forum_exp/forum_posts.asp?TID=752
Printed Date: 22 Nov 24 at 8:35AM


Topic: Convert2Pdf - why is it sending email?
Posted By: David_Carle
Subject: Convert2Pdf - why is it sending email?
Date Posted: 01 Aug 11 at 3:14PM
Using PDF reDirect Pro v2.2.8
I have written code that uses the Convert2Pdf routine to generate PDF files for subsequent emailing.  This works fine on some machines, but on one machine it is generating an email, even though no email address, subject etc is provided (I guess it's using the last entry from the registry?)

Can you give any suggestions as to why this would be happening, and how to prevent it.

Thanks

PS - I'm using Access 2003 SP3 on Windows Vista Ultimate SP2





Replies:
Posted By: Michel_K17
Date Posted: 01 Aug 11 at 7:40PM
Hi David,

   Not sure if you realize, but there are two ways to send e-mails. One is via the Batch Printer settings, and the other is manually, via the ActiveX component. Assuming that the code is the same, then I would check to see if your Batch Printer in the suspect computer has a different settings.

   On that computer, start PDF reDirect Pro >> Preferences >> Batch Printers >> Select the batch printer (probably "BatchPDF") and check to see if there are any e-mail addresses entered in the e-mail options there.

   I hope that helps.

   FYI: you might want to consider upgrading to the new v2.5.2 as I do not (technically) support the older v2.2.8 anymore.

   Cheers!



-------------
Michel Korwin-Szymanowski
EXP Systems LLC


Posted By: David_Carle
Date Posted: 29 Aug 11 at 2:34PM
Hi Michel
We are still encountering this problem with v2.2.8
 
As per your suggestion above, I checked Preferences - Batch Printers and the email details (subject, Email Address etc) were shown there, so this does seem to be the source of the data of the problem.
 
So it seems to me that in certain cases this does not get cleared out, and then gets used as the default when no email address is supplied.
 
So my questions are:
1. Is there a way to force the default email address to get cleared after emailing?
2. Is there a way to call Convert2pdf with some other email address that will prevent it from emailing (I'm using "" ie empty string at present)
3. Is there any harm in deleting the BatchPDF file (in C:\Users\[UserName]\AppData\Roaming\PDF reDirect\Batch_Printers
4. Alternatively is the email address always on line 20 of this file?
If so I could write a program to change this line to "" if this would solve the issue.
 
(PS We haven't encountered this issue in v2.5.2, but can't upgrade to that at present due to the issue of the WIN.DAT attachments).
 
Thanks for your help
 
David


Posted By: Michel_K17
Date Posted: 29 Aug 11 at 11:14PM
Hi,

   I think you are on the right track. Here are the answers to your questions:

1. Is there a way to force the default email address to get cleared after emailing?
Yes. Setup a timer, wait (a couple of minutes?) for the e-mails to be sent, then change the settings back to blanks (oPDF.Settings_Email_TO = "") etc.

2. Is there a way to call Convert2pdf with some other email address that will prevent it from emailing (I'm using "" ie empty string at present)
Yes. setting oPDF.Settings_Email_TO = "" (etc.) would be a great way to go about it. Alternatively, you could use your own code after the PDF is created to send your e-mails. Sample code is available [ http://msdn.microsoft.com/en-us/library/aa733653%28v=vs.60%29.aspx - here ]. I can also send you my code from PDF reDirect (contact me by e-mail). Finally, there are lots of 3rd party e-mail controls available for purchase.

3. Is there any harm in deleting the BatchPDF file (in C:\Users\[UserName]\AppData\Roaming\PDF reDirect\Batch_Printers
No. That would work too. Make sure you delete it a few seconds after you have initiated your printout (ie give time for the Batch printer to load the settings).

4. Alternatively is the email address always on line 20 of this file?
If so I could write a program to change this line to "" if this would solve the issue.
Starting in v2.5.5, the ini file will be a true settings file, so the location of the e-mail will change, and will require the Windows API functions to read/write to the file directly.

   I hope this helps.



-------------
Michel Korwin-Szymanowski
EXP Systems LLC



Print Page | Close Window