Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Mail Attachement

by Chady (Priest)
on Dec 26, 2000 at 14:33 UTC ( #48314=perlquestion: print w/ replies, xml ) Need Help??
Chady has asked for the wisdom of the Perl Monks concerning the following question:

Hi..
   I am working on a webmail interface.. I give the users a virtual e-mail, that is really forwarded to their original e-mail address.. now I need to make an interface so that they can send from this virtual e-mail address I'm giving. I made the interface quite allright, but I still need to know how to make an attachement to the e-mail. is there an easy way to do it using the sendmail porgram?
I downloaded Simon Tneoh Chee-Boon's FileUpload.pm this way I can upload the file to a directory I specify, and then put a link to it in the sent mail, but I want it to go through with the e-mail.
any tips?

Thanx in advance

Chady | http://chady.net/

Comment on Mail Attachement
Re: Mail Attachement
by Corion (Pope) on Dec 26, 2000 at 14:55 UTC

    The module you want to install from http://www.cpan.org is MIME::Lite or, if you need more than what it provides, MIME::Tools, which includes everything and the kitchen sink.

    CPAN also provides you with various mail modules. To find MIME::Lite, I used the CPAN nodelet, which is an interface to http://search.cpan.org.

Re: Mail Attachement
by chipmunk (Parson) on Dec 26, 2000 at 19:03 UTC
    I second Corion's recommendations for MIME modules from CPAN.

    Even if you find out that it is easy to send an attachment with sendmail, I hope you will consider using a CPAN module for sending the mail too (with or without an attachment). I prefer the MailTools distribution; other choices include Mail::Sender and Mail::Sendmail.

Re: Mail Attachement
by merlyn (Sage) on Dec 26, 2000 at 20:03 UTC
Re: Mail Attachement
by Chady (Priest) on Dec 27, 2000 at 02:51 UTC
    Ok guys.. so I went and downloaded the MIME tools, but I cannot install them. I am using a free hosting service and do not have telnet access.. so I cannot install anything on their servers...
    I'm really feeling dumb here... ;)

    Chady |
    http://chady.net/
      Mail::Sender for one does not require any priviledges to intall it - just make sure it is in the right path and go ahead and use it. Since you have no telnet access, you will have to add
      use lib 'path/to/where/you/stuck/Mail::Sender'
      at the top of your script. Make sure you have a Maildirectory with Sender.pm inside it, then use the lib line above to point to the directory in which the Mail directory resides.
Re: Mail Attachement
by Chady (Priest) on Dec 27, 2000 at 02:51 UTC
    Ok guys.. so I went and downloaded the MIME tools, but I cannot install them. I am using a free hosting service and do not have telnet access.. so I cannot install anything on their servers...
    I'm really feeling dumb here... ;)

    Chady | http://chady.net/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://48314]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-10-02 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (41 votes), past polls