i want to attach documents with the email.i have a field in my db which contains the path where the file is stored.when the user want a particular doc ....i want it to fetch from the database and send it to their email address..................
Jump to Post
hi, try something like this: (it works for me)
$to = 'firstname.lastname@example.org';
$subject = 'Test email with attachment';
//create an unique boundary string.
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time()));
$headers = "From: email@example.com\r\nReply-To: …
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.