Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

SMPTit sends pdf that is corrupted.


This topic is 7736 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am currently using STMPit to send out a PDF that gets automatically generated on my desktop. Well when the attachment comes through (email)it cannot be opened because it claims it is corrupted, and it's alot bigger that what was generated on the desktop. But the weird thing is that the one on the desktop is fine the size correct and it opens up fine its just when it email out that it's corrupted. Anyone have any clues? I am using SMTPit v.3.12.

Thank you,

Jaser

Posted

Could be a timing problem Jaser.

Try putting short pause in the script (1 sec might be sufficient) between when the pdf is created and the External("SMTP-Send", "") function call.

Just in case the problem arises from the disk cache not having yet fully updated the directory path, that will provide the possibility of a different outcome. If it makes no difference, at least it will be one thing you've ruled out.

Failing that, I would then try emailing the file as an attachment via a separate email client application, in case the corruption in fac t results from something occurring on your mail server rather than anything local to your own process.

HTH

Posted

Thanks for the reply! Okay this is what I tried... 1) I sent myself an email w/attachment that used the SMTPit program and the PDF came out corrupted.

2) On the same computer I used Oulook and sent myself an email and manually attached the PDF, this came out fine.

Even though I used SMTPit and Outlook two different products they still went through the same SMTP server, but the SMTPit came out corrupted and Outlook did not. Any thoughts on that?

Posted

Ok, that's interesting, and suggests that the problem is local rather than with the SMTP host - but I'm not clear whether you tried testing the timing issue?

Aside from that, I've seen (and coded) various FM solutions that sent out attachments using the SMTPit plug-in, so whatever is amiss here would seem to be somthing to do with your set-up or the sequence of script calls you are using to send the file.

As well as testing the timeing issue, I'd sugest that you try using SMTPit to send an ordinary text file as an attachment and see if that suffers the same fate.

If experimenting on the timing issue and with other types of attachment does not give you any clues, I suggest that you post here with additional details such as:

- the platform you're running on

- the version of the operating system you're using

- the release version of FMP you're using

- the version of SMPTit you have installed

plus a transcript of the exact script sequence you're using to generate, attach and send the email and attachment that is causing the trouble.

Then someone here might have a chance of offering you suggestions that are not based purely on blind guesswork... : :

Posted

Hi all:

I also had problems with the SMTPit plug in at one time. If what Ray has suggested does not work, I can tell you that if you e-mail CNS, Jake over there really knows the product and is happy to help.

Ken

Posted

As for the timing issue I really don't know where to do that at. Just a quick review on what's going on.. We are running FM6 unlimited on a windows 2000 machine. The version of SMTPit is 3.12.

We have a database that prints out transmittals or fax sheets as a PDF then SMTPit grabs that PDF and emails it out.

So, when a user is inputing the info he want on the transmittal there is a button that says print PDF, when the button is executed the (and I didn't set this up someone else did that is no longer with the company) transmittal is printed out on the desktop of the Windows 2000 machine as a PDF which gets overwritten everytime someone use this transmittal database. Then STMPit pick it up somehow and emails it out.

The PDF that is on the desktop opens up fine and if I manually send that PDF out through Outlook it does not come out corrupted. But if SMTPit sends it then that PDF becomes corrupted and cannot be opened.

I also did test out a txt file and that came trough but it had all kinds of wierd text in it that I did not write in. I only wrote a couple of words and it came trough with all kinds of code or something in it.

Hope this helps and thanks again.

Posted

RE: So, when a user is inputing the info he want on the transmittal there is a button that says print PDF, when the button is executed the (and I didn't set this up someone else did that is no longer with the company) transmittal is printed out on the desktop of the Windows 2000 machine as a PDF which gets overwritten everytime someone use this transmittal database. Then STMPit pick it up somehow and emails it out.

When "then"? Are you sure, that the PDF finished? I bet not yet and that is why is bigger, then final PDF.

So during that building process, the unfinished PDF is picked by SMPTit and send. Then you do it manually with OE, but after that PDF is finished.

That is why Ray suggested you should introduce delay.

I'll suggest waiting even longer time, but the PDF creator shouldn't be affected by the FM Pause.

Posted

Thanks for the reply! Forgive me for my lack of knownledge of FM but the guy that created all of our database just left the company and is very hard to get a hold of to ask questions so I'm stuck here learning it from scratch.

Well if it's a timing issue where do I find/set that at?

Thanks again.

Posted

Best for test will be to exit the script after the creation of PDF.

Copy the script and erase the PDF creation part.

Then, after the PDF is created -- check that -- try to execute the sending part of script.

If it is working, pause the first script for 1-60 seconds in the place of exit.

HTH

  • 2 weeks later...
Posted

Thanks, here's the thing I'm not the one that set this up in fact I am very new to Filemaker and am learning as I go. So how would I put a pause in the script?

Thanks again.

Posted

Hi Jaser,

To put a pause in the script, you will need to go to the Scripts menu and open the ScriptMaker dialog, then locate the script in the list and double click it to open it for editing.

Once the script is open, you will see a list of the steps in the script in the main body of the window (a large list panel at the right) and a list of available script steps in the narrow column at the left.

First of all you need to find the point in the script where the pdf is created. Presumably that will be via a Print [No dialog] command. Click on that command to select it.

Then double click on the Pause/Resume Script command which appears near the top of the list at the left - it should be inserted into the script immediately after the step you had selected. Once it is in the script panel at the right, double click it to open its parameter dialog, select the 'For duration' option and specify a time - eg 30 secs - then click ok to close the dialog.

Finally, click ok to save the changes to the script, then in the next dialog, accept the default options to keep all the settings, then click done to exit the ScriptMaker dialog and go test the script out to see if the pause makes any difference... :

Posted

Thanks again,

Okay I did noticed that SMTPit would send it out while the Adobe Distiller was still printing it out. But unfortunately doing the pause did not solve the problem. What I did try is I already had a text file on my desktop that is about 38bytes so I pointed the SMTPit plugin to grab that file instead.

Well it came through to my email in the size of 71k and my text was in there with a bunch of other stuff I did not put in there. Here is an example and the HP stuff and PDF text is my original text. Any clues?

HP 8100 N

HP 8150

HP 4MV

PDF(Email)

This topic is 7736 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.