Jump to content

Archived

This topic is now archived and is closed to further replies.

CanMan2004

PHP Email

Recommended Posts

Hi all

I have a simple php email code

[code]$to      = 'test@test.com';
$subject = 'test';
$headers = 'From: NGRS (info@test.com)' . "\r\n" .
  'Reply-To: info@test.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
$message = 'test';

mail($to, $subject, $message, $headers);[/code]

I want to attach a pdf file to the email that is sent, the file is stored on my server.

Can anyone help? I've tried a few codes and examples on some sites, but doesnt seem to work with what i've tried.

Any help would be great

Thanks in advance

Dave

Share this post


Link to post
Share on other sites
I don't know how to do that.. but there's some information about it here: http://ca3.php.net/manual/en/ref.mail.php

Just press Ctrl+F and search for "attach" on that page.

Share this post


Link to post
Share on other sites
I has a similar question:
http://www.phpfreaks.com/forums/index.php/topic,103450.0.html

There is a link there to information about creating emails with attachment via PHP. 

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.