FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » sending pdf files to individual email...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: sending pdf files to individual email... [message #186433 is a reply to message #186431] Tue, 29 July 2014 10:40 Go to previous messageGo to previous message
Ben Bacarisse is currently offline  Ben Bacarisse
Messages: 82
Registered: November 2013
Karma:
Member
nag <visitnag(at)gmail(dot)com> writes:
<snip>
> I have a text file with employee_number and employee_name and
> employee_email id delimited with comma.
>
> i have uploaded it into a mysql table called empDetails.

That may not be the best thing to do. For example, if the definitive
source of the data is somewhere else and it's been exported to you to
do this task, putting it into a DB just complicates the process and adds
another point of failure. It does not make the task any easier.

(Of course, there are lots of cases when it *is* the right thing to do --
it's impossible to say from what you've said.)

> I have a folder containing pdf files. Each pdf file is named with
> <employee_number>.pdf
>
> Now I want to send the each pdf file to respective employee mail id as
> an attachment from my mail.
>
> Kindly give me a solution.

There are two parts to this: constructing the emails and sending them.
You probably want something like the PEAR package Mail_Mime[1] for the
first part. What the best way is to send the emails depends on many
factors. The PEAR package Mail[2] is more flexible than PHP's built-in
mail function. You might need it if, for example, you need to send the
mails using a specific mail system.

[1] http://pear.php.net/package/Mail_Mime
[1] http://pear.php.net/package/Mail

--
Ben.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: We are trying to make the world a better place, wanna join us?
Next Topic: installation de php_ssh2.dll avec PHP 5.4.3
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Dec 27 18:29:47 GMT 2024

Total time taken to generate the page: 0.04661 seconds