Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Attachments


I would like to enable a user to upload files from a page. Reading the PHP manual, all I can find is that they require "HTTP POST". The problem is, I cannot use this method of dealing with form data. Is there another way anyone knows of to upload a file using PHP? I am not even sure exactly how it is done.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
How To Mail With Attachments
I would be greatful if somebody out there knows how to attach a text document to an E-mail using PHP. I have looked at mail() but I can't figure out how to do what I want.
Thanks for any replies!

View Replies !   View Related
Imap Attachments
Can anyone tell me how to read mail attachments thru php.
is there any imap function which does this.

View Replies !   View Related
Displaying Attachments
I have a shell script which parses an incoming email and stores the full email (including attachments) into the mysql table using an insert statement. This email is then displayed (including attachments) in a html textarea. The attachments are displayed as some junk characters.

Is there a way to save this attachment to the hard disk and view it in its original form. I want to do all this through an html form. I guess first I will have to get the required part of text (attachment) from the textarea. Then convert/encode the attachment. Then open a download box.

View Replies !   View Related
PHP Mail Attachments
I have written / adapted a script that lets the user upload a number of file, these files are then attached to an email and sent to someone.
I have successfully got the script to attach 2 files, problem is when i try and attach any more than that they do not get attached.

The files i am trying to attach are not that big, so i would assume its not because of files size. was wondering if there is a limit on how many files you can attach to email and if there is is there any way i can change it..

View Replies !   View Related
Attachments And Email
Can anyone point me in the right direction of a script which creates a file with a few lines of text written in it and then emails it as an attachment to a given address? I know this has been asked before, but I found that the suggested link was broken.

View Replies !   View Related
Mail() With Attachments
Of course I could generate a unique boundary, use the base64_encode()
function and do all the MIME-stuff myself, but I am trying to avoid
re-inventing the wheel.

Anyone know of a *good* PHP function for sending an e-mail with multiple
attachments?

Using PHP 4.3.something.

I've been looking at this:
http://pear.php.net/package/Mail_Mime
and this:
http://www.phpguru.org/static/mime.mail.html



View Replies !   View Related
PHP E-mail With Attachments
i wish to send a PHP e-mail with attachments, is this possible?!

View Replies !   View Related
Attachments With Mail()
I have a piece of code that adds the attachment just fine but the message is never added, any ideas: Code:

View Replies !   View Related
E-Mail Attachments
I've been trying to find something about how to do this all day but haven't had any luck as yet.

I'm trying to find a way to get a PHP script to pick up an attachment from an e-mail that is sent. For example...

User sends e-mail with attachment to address@domain.com which is directed to www.domain.com/script.php

So, the e-mail is being handled by script.php. I then need this to look at the e-mail as a whole including the e-mail address its been sent to but more importantly to pick up the attachment and place it in a folder on the server.

Hard to explain but I hope that's easy to understand.

View Replies !   View Related
Mail() & Attachments
I just want the form to be able to mail an attachment, but no matter what, I keep getting the "Undefined index:filename" error.

I've tried setting the error reporting at different levels, but that doesn't seem to help. I'm convinced there's something wrong with the code....

View Replies !   View Related
Put Attachments Option
how can i put a attachments option on my phpnuke forum i want people to be able to use attachments Mp3,wav.zip.pic.rar,and more.

what im doing a forum so people can battle Beats on the forum by puting attachments and people can download the beat or if it is posible to be no download youst click.

View Replies !   View Related
Attachments Showing
have been working on an emailer and its working, check out my code below. my images should be in the attachment but it shows up below the emailer.

$hdr .= "--SOMEWEBSITE";
$hdr .= "Content-Type:$filetype;";
$hdr .= "name="$file_name"";
$hdr .= "Content-Transfer-Encoding:base64";
$hdr .= "Content-ID:classic1";
$hdr .= "Content-Disposition:attachment;";
$hdr .= "filename="$file"";
$hdr .= "$fileinc";

it makes no difference if i set the Content-TRansfer-Disposition to "inline" or "attachment"

View Replies !   View Related
HtmlMimemail And Attachments
I am trying to send emails with an attachment using htmlMimemail 2.5.1 (PHP5 isn't supported by my webhost...yet). I can send HTML and text emails fine until I insert the code to add the attachment. Here is what I'm working with to email file "fileatt": Code:

View Replies !   View Related
Receiving Attachments
I'm using the POP3 class to receive emails for a moblogging type site but I can't figure out how to make it receive attachments. Anyone know a good simple way? A typical attachment would be an image and it should be automatically downloaded and posted in the entry.

View Replies !   View Related
Mail With Attachments
I'm making a form where they can fill it up on the site and it will be automatically be emailed to my ad, but my problem is how do you attach a file with it? word and pdf formats specifically. is there anyone here that can show me a link or share their source codes?

View Replies !   View Related
Phpmail And Attachments
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage("en", "/usr/lib/php/");
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "10.138.0.5"; // Exchange server
$mail->From = "John.Doe";
$mail->AddAddress("John.Doe");
$mail->Subject = "CCMDS form";
$mail->Body = "CCMDS form";
$mail->WordWrap = 50;
#$mail->AddAttachment("/tmp/fpdf.pdf");
if(!$mail->Send())
{ echo "Message was not sent";
echo "Mailer Error: " . $mail->ErrorInfo;}
else
{ echo "Message has been sent";}

works as long as the attachment isnt added - as soon as I uncomment the AddAttachment line I get the 'message' sent but nothing appears at the other end and I get no bounce/error message.

View Replies !   View Related
Email Attachments With PHP
I have learned how to POP email with PHP using IMAP. I have learned how to send attachments with POP. Now, I want to create a mail parsing script that will check my POP box and display any attachments that I receive, like a normal email program.

View Replies !   View Related
Emailing Attachments
I want the user to be able to email the images in their lightbox (stored in an array in a session) to themselves as a zipped folder of images. Obviously the images themselves are not in the db so I need to pull the image files using the the file paths in the db, put them in a zipped folder and send them as an attachment to the user. I've tried googling it but I can't find anything that fits the bill.

View Replies !   View Related
Soap With Attachments
I'm looking for an example SOAP client that can send an attachment to a server. I imagine there are a couple of ways to do it, one being calling a function defined in the web service and supplying the data in the file to be attached as a parameter. This may mean opening the file reading its contents and sending it to the server function. The server function would then need to save that data or process it accordingly.

View Replies !   View Related
Sending Attachments
I wish to create a content submision form in which users can submit file attachment such as word document. Can anyone give me some advice regarding security?

View Replies !   View Related
Mail Attachments
sending basic text and html e-mails but what i am wondering now is how to attatch a file.

how do i go about sending a message with an attachment from my server? this.zip or that.jpg? s

View Replies !   View Related
Decoding Attachments
I am working on a php script to archive emails from IMAP server. I can now copy emails to a file or send to browser. What i am looking for is some information on how to strip and decode attachments. is there is php function.

View Replies !   View Related
File Attachments
i have a php script to send text form, but i would like to attach 3 photo accepting jpg / png files only. I try coding it myself but always get some error or it go through but i dont receive any in my inbox! I trying to send the files as an attachment to my inbox.

<?php

$ip=@$REMOTE_ADDR;
echo "<font face='Verdana' size=&#393;'><b>IP Address= $ip</b>";
$TS = date("l, F d Y h:i a",time());
$salute = $_POST['salute'] ;
$Name = $_POST['Name'] ;
$Email = $_POST['Email'] ;
$Type = $_POST['Type'] ;
$msg = $_POST['msg'] ;
$recipient = "email@domain.com";
$subject = "Contact Form";
.......

View Replies !   View Related
Base64 Attachments - What Is An ATT*.ATT File?
I altered an attachment script I found on usenet to send multiple attachments. The script is functional however in the delivered message I get a file named "ATT538056.ATT" in the list of attached files. The file is only 95 bytes in size and contains no characters (viewed with UltraEdit).

What am I doing wrong in the script that is causing this empty file to be included?

View Replies !   View Related
Retrieving Mail Attachments
I would like to retrieve mail attachments but am clueless as to where to start.

View Replies !   View Related
Php Code To Email Attachments
I have a simple form I use to send emails when I am away from the office (copied below).

Can anyone tell me the php code to get the form to send attachments?

------------------
<? if if ($submit) {
mail($MYEMAIL,$SUBJECT,$MESSAGE,"From: $EMAIL");
} else {
echo "Send Email";
}?>

<FORM METHOD=POST>
To: <input type=TEXT name="MYEMAIL">
From: <input type=TEXT name="EMAIL">
Subject: <input type=TEXT name="SUBJECT">
Message: <textarea name="MESSAGE"></textarea>
<input type=SUBMIT name="submit">
</FORM>

View Replies !   View Related
Problem With Mail Attachments
I have a problem with mail with attachments.
To send e-mail with attachments from a form, I use Setec Astronomy's libmail
class (v 1.4) (available here http://www.phpclasses.org/)

Everything is ok but if I use a specific e-mail address (say address X) in
the field To, the e-mail arrives without attachments. (even if I use two
addresses for field To, of which one is address X, the mail to address X
arrives without attachments, the other arrives with attachments)

So I think that the problem concerns a 'strange' configuration of the mail
server of address X.

Here are the functions for attachments:

View Replies !   View Related
How To Delete Attachments From A Letter?
I want to archive a letter, but I can't figure out how to "strip out"
the attachments, photos etc. that were sent along with it.

View Replies !   View Related
Email Attachments And PDF Files
I'm trying to attach a PDF file to an email, and when it gets sent, the PDF file is corrupt. The error is something like "File can not be opened because file does not start with "%PDF" I know it has something to do with my content file type declarations, but I can't get anything to work. Can someone tell me what's wrong with the following mime-class file? PHP Code:

View Replies !   View Related
Multiple Attachments With Mail()
I made the following script, but it only sends 1 attachment even if $aantalgef>1. Does anybody know why? PHP Code:

View Replies !   View Related
PHP & IMAP Forwarding & Attachments
I'm looking to setup an email system that will log into a catchall
account, read to addresses and forward them to a different email address
stored in a MySQL table. I may also allow the users to store these emails in
their own accounts at a future date.

I've got the IMAP checking etc etc working just fine. However this will be
more troublesome if someone includes an attachment. Firstly, the
imap_body($mbox,$num) chucks out loads of gobbledygook[1] at the moment. I
guess this is the real code behind, but how should I forward that? Also, can
I reject any attachments easily?

[1]
/9j/4AAQSkZJRgABAgEBLAEsAAD/7QlMUGhvdG9zaG9wIDMuMAA4QklNA+0KUmVzb2x1dGlvbgAA

AAAQASwAAAABAAEBLAAAAAEAAThCSU0EDRhGWCBHbG9iYWwgTG lnaHRpbmcgQW5nbGUAAAAABAAA

AHg4QklNBBkSRlggR2xvYmFsIEFsdGl0dWRlAAAAAAQAAAAeOE JJTQPzC1ByaW50IEZsYWdzAAAA

CQAAAAAAAAAAAQA4QklNBAoOQ29weXJpZ2h0IEZsYWcAAAAAAQ AAOEJJTScQFEphcGFuZXNlIFBy

aW50IEZsYWdzAAAAAAoAAQAAAAAAAAACOEJJTQP1F0NvbG9yIE hhbGZ0b25lIFNldHRpbmdzAAAA

SAAvZmYAAQBsZmYABgAAAAAAAQAvZmYAAQChmZoABgAAAAAAAQ AyAAAAAQBaAAAABgAAAAAAAQA1

AAAAAQAtAAAABgAAAAAAAThCSU0D+BdDb2xvciBUcmFuc2Zlci BTZXR0aW5ncwAAAHAAAP//

AAAAAQAtAAAABgAAAAAAAThCSU0D+////

View Replies !   View Related
Send Email Attachments
Does anyone know how to send email attachments in php using the mail function?

View Replies !   View Related
Reading Outlook Attachments
Does anyone know of a class which will read outlook email messages. I
need to be able to scan outlook for "non-read" e-mails with a specific
subject and then save the attachments and mark the e-mail as "read". I
tried working with the am outlook application COM object but could
not get it to work.

If you have another way to do what I want, without human intervention,
I'm open for suggestions. I't goes without saying I want to be able to
do it form or with PHP.

View Replies !   View Related
PHP Email Attachments & Outlook XP
I was curious to know if anyone was experienced any difficulty in receiving PHP generated emails with file attachments using Outllook XP as their mail client. I have used PHPMailer, as well as other classes to accomplish this functionality, and has worked just fine in all other clients, except my client just updated their software to XP... I thought perhaps the encoding could be slightly different, any thoughts?

View Replies !   View Related
Downloading Attachments From Mailclient
i try to download attachments from a mailclient, but it doesn't seem to work
somehow, the code adds 2 spaces in the beginning of the attachment for example the beginning of a jpg image, opened in notepad++ looks like this:

ÿØÿàNULDLEJFIFNULSOHSOHSOHNUL`NUL`NULNUL and so on, what it means doesn't realy matter for me, what matters is that while downloading the image those 2 spaces you see come in front of it on the first row, so the image wount load anymore, unless i open it with notepad++ and remove the spaces. Code:

View Replies !   View Related
Send Multiple Attachments
Basically I have successfully found a function that can send email with attachment. However wasn't able to send multiple attachments. I tried sending two attachments manually, but only the second was successfully attached. Can someone look through the code below and point out my mistake. Code:

View Replies !   View Related
Email Form With Attachments
I'm interested in creating a php based form that is capable of sending attachments. I really dont know what to do since an attachment can't really be saved to a variable (i'm guessing). This is the emailer code i've been using but i'm not sure what to add to do attachements. Code:

View Replies !   View Related
Email From Address And Attachments?
mail($EmailTo, $Subject, $Body, $mail_header, "From: <$from>");

im trying to set the from address in an email, but when i do it with the above it doesnt work!  Instead it stops the header being set to HTML and shows that code.  Can any one tell me where im going wrong? Also how can i send attatchments with an email?

View Replies !   View Related
Sending Email Attachments
simple question on sending email attachments via a contact form on a website. although because it's for clients i need one of those "browse..." buttons that allows you to search for the file on your computer and then uploads it to the server before sending... if that makes sence. Code:

View Replies !   View Related
Emailing Attachments Issue!
Ive got a problem with my site that I cant figure out... Im hoping someone on here knows what I should be looking at to find the problem here.

Summary: my site is a complex custom php/mysql scripts based site.
It has the facility to send uploaded word document to customers on request.

This used to work fine. But (and ive had this once before but fixed it without realising how!) ....since some recent seemingly unrelated development work, the emails are being sent to customers, but instead of being sent as an attachment the 'attached document' is actually being sent as part of the email.

So it is encoded into the emails body as opposed to attached seperately?!! 

Anyone have any ideas where to start looking! or what to do to locate the problem.

The server is mine (dedicated) and I have examined the mail logs and all is ok,the main email function works fine and sends normal emails no problem through other bits of the site. Code:

View Replies !   View Related
Access Pop3 Attachments
If there is an easier way then please tell me. I've tried using the imap_open function to access the mailbox specifying port 110 instead of 143, but no dice.  So I've been relegated to using fsockopen and sending telnet commands. I can use all the basic commands and retrieve individual messages, but the caveat is that I need to be able to open WAV files that are attached to these emails.

I'm not having any luck with this. If I could just somehow store the wav file somewhere on the server in a tmp folder or something that would work great. For full disclosure, yes I am connecting to a remote pop3 server, if it was on the same host i imagine that would make this somewhat easier.

View Replies !   View Related
Mail With Attachments Having Issues
i have a php mailer, that send an attachment. its working great in gmail, but in yahoo mail, instead of seeing the thumbnail image of the attachment i see ÿØÿà but i am able to download/view the attachment fine. what can be causing this? in gmail, i can see/view the thumbnail attachment fine Code:

View Replies !   View Related
Email Attachments That Are In The Database
I have documents in a database that I need to email. I have a script that works sending attachments, but only if the file *really* exists on the server. I have another script that pulls the file contents from the database for download, but obviously that does not create a *real* file on the server.

How would I do this? I've googled for a while and can't find this information.

View Replies !   View Related
Process Files In Attachments
I would like to know how can I process attachements in my mail, which are on the same server using PHP.

i.e. Everytime a mail is received with a particular subject and from a particular IP, the PHP script should be invoked and process the attachment(reading content in the attachement and doing necessary changes in the database).

View Replies !   View Related
Email With Dynamic Attachments
I have a database filled with email addresses and would like to email them all an excel file, that has different values based on their id number. I generate those excel files with a php script, but I was wondering if there was a way to execute a php script that would automatcially generate the same dyanamic excel file but also email it to the corresponding email:

<?php
include 'includes/config.php';
include 'includes/opendb.php';
$site1=$_POST['site'];
$fromdate=$_POST['months'];
$todaydate=date("Y-m-d");
$query ="SELECT ticketno, connect, date, rmnum, problem, resolution, connected
FROM helpdesk h
WHERE h.sid = '$site1'";

This script is for when an individual is logged in, I would like it to generate over 20 different xls files to email based on each information and email the corresponding xls to the email that is registered.

View Replies !   View Related
Sending Attachments Directly From Form
I have a form with a normal upload type form item, now when this form is submitted I want to attach it to an E-Mail, and then send it out.

What do I do in the PHP form processing code to do this? Obviously I would use MIME mail, but what is the easiest way for me to do this.

Specifically this is for attaching a Resume to a job application that will be sent to an E-Mail address immediately. So the file types will be the normal, '.txt', '.doc' etc.

View Replies !   View Related
IMAP: How To Save Attachments Into Files ?
I have a small problem with my own mail2blog script. I'd like to save the attachment of a mail in a seperate file on the server.

I can allready read the name of the attachment, but how do I save the content to the file?

View Replies !   View Related
MIME Attachments Stored In MySQL
I am parsing a mailbox using the imap functions, pulling out images
attached and putting them into mySQL as BLOB fields. I am having
problems displaying images once they are stored in mySQL, and I think
it may be related to the way I store them.

The following line of code is called after an attachment has been
identified as a GIF attachment:

$rawimage = addslashes(imap_fetchbody($mbox,$m,$part_c));
....where $mbox is the imap link and so forth.

Testing to make sure I am actually pulling info out, a debug line like:

print_r($rawimage);

....displays a bunch of chars that are the image attachment data, and a
line like:

print_r(base64_decode($rawimage));

....displays other, different chars.

Looks good so far - I'm definitely pulling images out as raw data.

So I INSERT the $rawimage into my blob field.

However, on the display page, I send the headers like:
header("Content-type: image/gif");
[get image from database and store it in a var called $image_from_db]
echo $image_from_db;

But I get a broken image...

So I try print_r($image_from_db) on this page (after removing the
header line) and it looks like the chars from the tests before - it's
the same data.

base64_decode($image_from_db) does not make the image display properly,
either, but printing it as such shows all those chars again.

I think I do not understand how base64 encoding and addslashes works
between MIME, php and mySQL. Anybody have any ideas? How should I
format the data when I pull it out of MIME (in terms of base64
decoding), how should I insert it (addslashes is correct?) and how
should I echo it when I pull it out into the displaying php image
generation page?

View Replies !   View Related
Reading And Decoding Email Attachments
i want to write a PHP4 script that reads POP3 or IMAP mail and can
decode the possible attachments in the email. I've looked around for
some classes to do this, and found a few, but most of them seem to be
very lowlevel or lacking in functionality. Is there a good script,
class or example for decoding email attachments?
I have used a class called attachmentread, but this class expects an
attachment as disposition: attachment, while my email with attachments
are all inline...

View Replies !   View Related
Multiple Attachments With Mail Function
I have a mailform and I want to allow users to send multiple attachments with one message when they hit the send button using the mail() function. How can I achieve this?

View Replies !   View Related
Sending Mail With Attachments Using Sockets
Using Sockets (fsockopen, fputs, fgets, etc.) I'm able to interact
with an SMTP server to send mail. However, do you know the steps
necessary in order to send a file attachment as well?

View Replies !   View Related
SEND AN ATTACHMENTS WITH MAIL FUNCTION
HOW TO SEND AN ATTACHMENTS(its like .doc format) WITH MAIL FUNCTION USING PHP SCRIPT....

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved