Can you auto-attach files in a PHP form?

Hi there,
Have been looking over everywhere for a solution to my problem. I am going to try and be as clear as I can about the problem.
I have had some experience making simple PHP forms that let the user put their name, email, subject and body text and send it in an email using the form.
But for a project I am currently undertaking - the client has requested a form that will pre-attach a particular document to the email when it is sent. All the user has to do is input the email address of the adressee and their name/email address and all the other fields are custom made (i.e. subject, body text) - and the email will be sent to the selected recepient with the file already attached.
I was envisaging the PHP script would collect the reference for a file that is already sitting on the web server and attach it in the function.
Is there anyway to do this? Because if it isn't I may as well tell the client to go and use outlook - because the web form will really have no purpose.
Thanks in advance

Hi have proceeded along the path of inserting links
into PHP generated email but I am having trouble in outputting the body message in HTML - All I get out
in the output email is the HTML tags with the text (plain text).
Did some research and found out that I have to determine the content type/charset.
I have tried to do this in my PHP but to no avail. Also I am not getting the email or name of the sender in the email that is generated....
Anyway, there is the PHP code (and it's not that tight but it works):
AND SOME DEFAULT TEXT THAT WILL CONTAIN LINKS TO NECESSARY FILES TO DOWNLOAD:
link to PDF '.$field_message; $headers = 'From: '.$cf_yremail."\r\n"; $headers .= 'Reply-To: '.$cf_yremail."\r\n"; /* If your e-mail is not valid show error message */ if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $mail_to)) { ?>
Any help on this would be much appreciated....
Thanks

Similar Messages

  • Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?

    Message title says it: Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?
    I can't find anything in the Knowledge Base that says these two options no longer work or still do.
    I do not have a system capable of running Lion, but I need to know the answer nonetheless.

    Gee, I don't know: "paste attachments mail Lion"? ;-)
    One further question, if I may: in Panther (which is where I've aggregated nearly 7 years of mail), if you copy more than one file in the Finder, switch to Mail, and paste the files into a new message, only the file names paste in. If you copy one file and paste it into a Mail message, you get the file, not just the name. Is that still true, or has that (IMHO) bug been fixed since 10.3.9?

  • I can no longer attach files to my outgoing Hotmail emails.  I only receive a message that an  error has occurred. Help appreciated.

    I can no longer attach files to my outgoing Hotmail emails.  I only receive a message where I would expect the Upload to appear that an  error has occurred.
    I am using a MacBook Pro with Retina, 2 Ghz Intel Core i7, OS X 10.9.4
    I have no difficulty attaching files to the outgoing Hotmails on the same account using my iPhone.
    Help appreciated.

    Thanks for this - not an immediate solution I fear but will keep unplugging stuff and restarting stuff.
    To try and be clearer about the problem - I have in the last managed to send attachments successfully.  Now  I can send and receive plain email messages but get the error message when I try to attach an existing file to an email - not just a particular file but it would appear all files are being treated in the same way. 
    An experiment to send a mail to which an attachment has failed to upload got the following message alongside the SEND button
    Files with errors will be removed from the email and not sent.
    - but the mail alone was sent and received successfully.  Thanks for any pointers you can give me. 

  • How can I add attachment files – or photos – to my created Adobe reader XI files?

    How can I add attachment files – or photos – to my created Adobe reader XI files?

    Hi adel ghonim,
    You can add images following the instructions in this Help article: Adobe Acrobat X Standard * Paste images as comments.
    You can also add attachments by clicking the paperclip icon in the left column of the Acrobat window...
    Please let me know if you need further assistance.
    Best,
    Sara

  • How can you back up files that are on an external drive?

    How can you back up files that are on an external drive?

    hw999 wrote:
    How can you back up files that are on an external drive?
    Easy way, CLONE IT to another HD
    HD cloning software options:
    1. SuperDuper HD cloning software APP (free)
    2. Carbon Copy Cloner APP (will copy the recovery partition as well)
    3. Disk utility HD bootable clone.
    Methodology to protect your data. Backups vs. Archives. Long-term data protection
    https://discussions.apple.com/docs/DOC-6031
    hw999 wrote:But all I want to do is include the data that I store on an (second) external drive (internal drive getting too full) part of the auto back up process using timemachine.
    BAD IDEA
    You want one backup (ie Time machine) and one (or more) data archive of just all your raw files (drag and drop, or cloned etc.)

  • Can't read attached files to older emails in Outlook 2010

    Hello,
    I have Outlook 2010 connected with MS Exchange.
    I can’t read attached files to older emails than 3 months. In attached elements there are only small files and I’m not able to open them (size in Bytes!) - double click doesn't work. I've tried different solutions:
    1. https://social.technet.microsoft.com/Forums/en-US/dd2869cb-5e53-4852-b0bb-15de6653db0c/dont-see-attachments-in-old-emails-on-outlook-2013?forum=outlook
    2. https://social.technet.microsoft.com/Forums/office/en-US/cbd420f1-ec7f-44ae-8f78-c7613e2eabb6/unable-to-retrieve-attach-document-for-older-emails-in-outlook-2010?forum=outlook
    3. Clear cache in Advanced Settings of Forms and clear C:\Users\%username%\AppData\Local\Microsoft\FORMS
    None of them works
    Thanks in advance

    Hi,
    Can you read the attachments if we logon in OWA? If attachments can be read in OWA, we may try to delete the original OST file and restart Outlook to sync a new one to see the result. If still no luck, we can create a new mail profile in Control Panel to
    check the result. See:
    http://support.microsoft.com/kb/829918
    If same issue continues in OWA, you may need to recover the data from the backup you create before.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • HT1461 For Boot Camp, if you save a file when you are on the Windows side, when you return to the Mac side, can you see the file or can it only be "seen" on the operating side you create it in?

    For Boot Camp, if you save a file when you are on the Windows side, when you return to the Mac side, can you see the file or can it only be "seen" on the operating side you create it in?

    Why don't you  (generic most every post lacks critical details) be clear and say you never used Mac OS etc.
    But, I did try to anticipate and give you what you needed.
    Excel is one of those rare programs that, if they are extremely large complex spreadsheets still tend to run better under Office for Windows.
    A VM won't do for that but it does make it easier to transition. As in: install Windows natively, then use VMware Fusion or Parallels to attach to the partition and OS. That way you can run Windows as Guest OS VM under Mac; and still run Windows natively dual-boot when needed.
    The word "see" was not what you wanted, was it? really? you want to open and make changes and keep it on Windows side rather than Save As or copy to Mac
    You use Windows and don't know it has NTFS (NT FileSystem)?
    http://en.wikipedia.org/wiki/NTFS
    http://en.wikipedia.org/wiki/Hierarchical_File_System (HFS) native file system used by Apple
    And there is much more UEFI style "bios" and other things I suppose.
    Great thing about Google and encyclopedias or dictionary, you can look up what you don't know.

  • Can you transfer picture files from an older version of aperture to aperture 3?

    Can you transfer picture files from an older version of aperture to aperture 3?

    Well, you didn't give any information on your Mac, your OS version, transfer pics from where to where, or anything else, so guessing is the best anyone can do at this point: you should be able to simply using drag and drop.

  • Can you share large files on iCloud drive like dropbox?

    I am exploring how to use iCloud drive now...and had a basic question.  Can you share large files from it in a similar way as you can with dropbox?  This is a great feature of dropbox...or google drive when mailing large files just doesn't work. 
    I have a Yosemite beta currently, and it doesn't look like you can do this. 
    I also was wondering if anyone has figured out how to make an alias of the iCloud drive on the desktop rather than always opening a finder window in order to drop files into iCloud drive....
    Yosemite Beta and Mavericks, iMac 2012/Mac Pro/Mac book air

    I am exploring how to use iCloud drive now...and had a basic question.  Can you share large files from it in a similar way as you can with dropbox?
    Have a look at the iCloud Drive FAQ:  The file size limit is 15 G:   iCloud Drive FAQ     http://support.apple.com/kb/HT201104
    You can store any type of file in iCloud Drive, as long as it's less than 15 GB in size. There's no restriction on file type, so you keep all of your work documents, school projects, presentations, and more up to date across all of your devices. Learn more about managing your iCloud Drive files.
    If you make an alias to a folder on iCloud Drive, you can drag it to the Favourites in the Finder sidebar. That is the best I could do.

  • Can you open freehand files in CS6?

    can you open freehand files in CS6? I have been using both illustrator & freehand for 15 years & have thousands of work files being freehand.
    It seems very disappointing to have to keep an old version of illustrator just to open these files. I also find it interesting that many of the key tools that freehand had over illustrator are not translated into the newer versions of illustrator. Something simple like you still can't have a unique picture bullet • before text in illustrator. In freehand you could cut & paste any graphic into the text you were designing.

    saturn234 wrote:
    can you open freehand files in CS6? I have been using both illustrator & freehand for 15 years & have thousands of work files being freehand.
    No. The conversion plugin didn't make it into CS6 so the last import function was CS5.5 
    It seems very disappointing to have to keep an old version of illustrator just to open these files.
    At this point, it is the only way to make your files convert into Illustrator although I've had some luck with exporting to EPS or (if your FH graphics are simple enough) save as AI format. Keep your eyes on this project however : http://www.stagestack.com/
    I also find it interesting that many of the key tools that freehand had over illustrator are not translated into the newer versions of illustrator. Something simple like you still can't have a unique picture bullet • before text in illustrator. In freehand you could cut & paste any graphic into the text you were designing.
    As a fellow FreeHand user, I couldn't agree more. Other users of both programs have said this endlessly over the years here. A litany of features are still m.i.a. since FHMX was acquired years ago... including inline graphics. It's almost comical.

  • Can you get the file name of the current executing TSQL script?

    Can you get the file name of the current executing TSQL script? I wrote entries to a generic log file and would like to include the script name.

    Okay, So What you can do is
    1. Read get the version from your  database and redirect it to a text file(SQLCMD outout can be directed to text file using -o option or windows redirection operator >)
    2. Now you can read this value from the text file either inside a batch file or a powershell script and decide what operations you can do. 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • How i can deal with oracle file by using php api

    how I can deal with oracle file by using php api ?

    What has this to do with Reflections and Reference Objects?

  • Can you import Dreamweaver files into Muse, how?

    Can you import Dreamweaver files into Muse, how?

    If the images aren't showing up in DW, why do you think they will show in Muse?  Obviously, something is wrong with the paths to those images.  And that will most likely be due to the underlying code.
    Can you post an example of a problem page?
    Nancy O.

  • I updated safari to 7.0.3 and pages to 5.2 and can no longer attached files in gmail that are pages or exported to word. Any suggestions?

    I updated safari to 7.0.3 and pages to 5.2 and can no longer attached files in gmail that are pages or exported to word. Any suggestions?

    I have a similar issue.
    After updating Pages to 5.2, all Word export documents are 10 times the size they'd normally be.
    A normal exported .DOC file that would have been under 200K, is now 1.7MB once exported.  !!! ???
    This is a major issue with Pages.

  • Can you edit xml files in adobe contribute

    can you edit xml files in adobe contribute

    No, you can't even open them in recent versions of PSE.

Maybe you are looking for

  • OIM User Groups - Export and Import

    Hi, I am looking for ideas for OIM User's groups to be exported from one environment to another environment. I am using the following logic, but it is too slow. Any suggestions are welcome. 1. Export the User's groups from Source Environment - Add it

  • How to create multiple workbooks in BI7 for a query

    Hi all, I have created a query and saved it as a workbook.If I want to create second workbook for the same query what is the way for that ? I am unble to trace the path.can anyone help me on this ? Regards   KK

  • Transfering files in ASCII mode using SFTP

    Hi All, We are using SFTP to transfer our files since we are using VPN. But we need a file to be transfered in ASCII mode from the remote system. We are using toad for that, but i heard that SFTP transfers file only in Binary mode by default. Is ther

  • Premiere & Soundbooth won't playback

    In both Premiere and Soundbooth, when I click on the play button to have video or audio files play back, it either does not respond at all, or it plays a half of a second and then returns to the point where my marker is.  I can manually slide the mar

  • Text element issue

    hi, Hi, In a custom trasaction , I have text element . When I transport that text upper regions , I am not able to see in transaction. But I can see that text in the Text-symbols( Program->GOTO--> text-symbols) let me know any suggestions. thnks.