PHP mail () Function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mman
Forum Newbie
Posts: 3
Joined: Mon Aug 18, 2003 8:16 pm

PHP mail () Function

Post by Mman »

I'm using the mail () functions for users to send me information which is then posted into a certain page of my website. Now I want users to be able to send me images, my question is how do I do this? My guess is below:

Code: Select all

<?php

$to = "webmaster@domain.com";
$subject = "Form Information";
//and so on...

$success = mail ($to, $subject, $from, $headers, $attachments)

if ($success)

print ("Sent Successfully");

else

print ("Error sending, please try again.");


?>

My question is, is there such variable $attachment that can be used to attach an image to be sent?

Thanks,

Mman :P
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Post Reply