Jump to content


Photo

PHP Email


  • Please log in to reply
2 replies to this topic

#1 CanMan2004

CanMan2004
  • Members
  • PipPipPip
  • Advanced Member
  • 254 posts

Posted 22 August 2006 - 07:31 PM

Hi all

I have a simple php email 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);

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

#2 Jeremysr

Jeremysr
  • Members
  • PipPipPip
  • Advanced Member
  • 199 posts
  • LocationSaskatchewan, Canada

Posted 22 August 2006 - 07:35 PM

I don't know how to do that.. but there's some information about it here: http://ca3.php.net/m...en/ref.mail.php

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

#3 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 22 August 2006 - 08:05 PM

I has a similar question:
http://www.phpfreaks...c,103450.0.html

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users