Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Programming
 EXP Systems Forum : PDF reDirect : Programming
Topic: Convert2Pdf - why is it sending email? Post Reply Post New Topic
Author Message
David_Carle
Newbie
Newbie
Avatar

Joined: 26 May 09
Posts: 36
Quote David_Carle Replybullet Topic: Convert2Pdf - why is it sending email?
    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


IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet 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
IP IP Logged
David_Carle
Newbie
Newbie
Avatar

Joined: 26 May 09
Posts: 36
Quote David_Carle Replybullet 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
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet 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 [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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum