PEAR has a class which may be helpful.
http://pear.php.net/package/Mail_Mime
On Thursday 23 October 2003 04:13 am, Don Mc Nair wrote:
> Hi
>
> Can anyone tell me how to add a file as an attachment to an email sent with
> something like the following ?
>
> $headers = "From: <".$fromaddress.">\
http://www.hotscripts.com/PHP/Scripts_and_Programs/Email_Systems/Email_Utili
ties/
- Original Message -
From: "The_RadiX" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 10:22 PM
Subject: [PHP] Attachments
I have read briefly through past topics..
Just wan
GOOGLE found this on first try
http://www.zend.com/zend/spotlight/sendmimeemailpart1.php
- Original Message -
From: The_RadiX <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 7:22 AM
Subject: [PHP] Attachments
I have read briefly through past topics..
Just w
s and upload the files to an
incoming directory with a timestamp prefix, so I can match the e-mails
with the uploads. This should be a fairly straightforward task, correct?
Jason Soza
- Original Message -
From: Jason Wong <[EMAIL PROTECTED]>
Date: Monday, April 22, 2002 0:54 am
On Monday 22 April 2002 02:33, Jason Soza wrote:
> Hmm... Okay, I used this script I found on hotscripts - it copies the
> entire file to the specified directory:
>
> echo "Trying to upload to: "
> . $upload_path . $filename . "\n";
>
> if ( file_exists($upload_path.$filename)
lse {
echo ""
. $message["incomplete"]."";
}
Now why would this work but the e-mail scripts not?
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 21, 2002 10:13 AM
To: [EMAIL PROTECTED
On Monday 22 April 2002 01:51, Jason Soza wrote:
> I haven't been able to identify what process actually truncates the file.
This should be the easiest to nail down. Add a bit of code so that when the
file gets uploaded, it gets copied somewhere, then you can manually check its
size. Obviously,
= "base64";
}
if (!$hasBody) {
$$msg->data("This is a MIME message with attachments");
}
my $m = $$msg->attach(%$data);
$m->attr("content-type" => $mime_t
On Sunday 21 April 2002 06:02, Jason Soza wrote:
> They actually vary as to where they become truncated - some are at 633
> bytes, some are at 1kb. The odd thing is that the PHP script I'm using to
> process the form actually pics up the correct filesize, it reports it to me
> under a $filesize va
ave completed this weekend.
Thanks for your help,
Jason
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 20, 2002 3:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Attachments
> I'm using 'POST' in my forms - any other ideas or places
On Saturday 20 April 2002 18:25, Jason Soza wrote:
> Sorry for the thread thing, I wasn't aware I was causing probs. I usually
> just use "Reply" to save having to enter the e-mail address, just laziness.
> I'll keep from doing in this in the future, thanks for letting me know.
Thanks, you'll ann
other ideas or places I could check?
Thanks again.
Jason
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 8:36 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Attachments
On Saturday 20 April 2002 12:29, Jason Soza wrote:
> Using both Perl and
On Saturday 20 April 2002 12:29, Jason Soza wrote:
> Using both Perl and PHP to send mail with attachments from forms, the
> attachments get truncated. Since both Perl scripts and PHP scripts do this,
> I'm ruling out coding error, and since my mailserver has been receiving
> e-mails from other s
I recommend sending yourself a mail with an attachment and check the
sourcecode of the received mail... together with base64encode() you should
be able to do the job...
Edward
- Original Message -
From: "Rafael Perazzo B Mota" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday,
Class to send a file as an attachment with the php mail() function.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1583
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
-Original Message-
From: Rafael Perazzo B Mota [ma
Hi Sjoerd,
> When i send a dynamic HTML newletter, which contains newsitems in the
> database I now send the e-mail with a link to the image on the webserver.
> What i would like to do is instead of linking the image, send the image as a
> sort of attachment. So an internetconnection is not requ
On the attachment subject,
does anyone know how to specify multiple mime types?
I have my attachment script, however people may be using it to send gifs,
swfs, or text files
I am specifyinmg the mime types like this
$type = "image/gif";
$header .= "Content-Type: $type;
wuld I do something
I've found a great SMTP class file that supports file attachments. Its just a
few lines of code that base64_encode's the attachment, and sticks it at the end
of the email. I guess just rip whatever code ya need out of this, for doing
attachments, and insert it into your own. Maybe do a little RFC
oops :) sorry... used the wrong lists
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Ker Ruben Ramos" <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 10:59 PM
Subject: Re: [PHP] Attachments in POP
> > Why are attachments
In a message dated 12/04/2001 09:55:18 GMT Daylight Time,
[EMAIL PROTECTED] writes:
<< How can i include a file as an attachment in an email? I'm looking for
something like this...
mail($to_email,%subject,$content,$attached_file);
Thanks in advance!
Dan >>
Unfortunately it`s not that
Thank you Michael. I will look for mime_mail classes.
"Michael Hall" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I'm not sure about including them in the mail function as such, but it can
> certainly be done using one of several mime_mail classes that ar
I'm not sure about including them in the mail function as such, but it can
certainly be done using one of several mime_mail classes that are around.
I don't have one handy right now but you can find them by searching the
php archives
and/or the annotated php manual. I know the one by Schumann and
22 matches
Mail list logo