• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1008
  • Last Modified:

fpdf - pdf sent as attachment using Pear Mail class - email with blank pdf being sent from server

Hi -

I'm using fpdf with Pear Mail class to send form results as a PDF email attachment.

When the form is submitted, the PDF is generated and all works well.

My issue is that the email with PDF attachment seems to be being sent from the server with blank results - in other words - the form is not being filled in (I know this because I inserted a hidden field in the form and the blank PDF did not print that value). So, this seems to be coming from the server somewhere - I'm getting 1 or 2 a week - just random.  Any ideas?
0
phillystyle123
Asked:
phillystyle123
1 Solution
 
Mahdii7Commented:
I would check the following:

Can a form be submitted with no data? If so, you may want to add server-side validation so that the mail doesn't get set unless the required fields are filled out. JavaScript validation wouldn't be sufficient in your case (or anyone's really) as some users and virtually all spiders have JS 'disabled'.

Record $_SERVER['REMOTE_ADDR'] somewhere in the PHP just before it sends out the email. I wouldn't be surprised if the culprit was a search engine spider accessing pages not excluded in your robots.txt. To remove the pages you don't want to be indexed (and executed) here is a robots.txt 'tutorial'.

http://support.microsoft.com/kb/217103

Good Luck
0
 
phillystyle123Author Commented:
I'm guessing this is the issue - thanks so much for the help!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now