|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
hi to all,
how can we attach a file to email using http post method? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 28 Jul 2005 03:47:38 -0700, ranjitkum@gmail.com <ranjitkum@gmail.com> wrote:
> hi to all, > how can we attach a file to email using http post method? Basically you would use file upload field(s) for the attachment(s) in a multipart form, properly process it into a valid e-mail format with attachment(s) on the server, and either handle the SMTP or hand it off to something that does. I have done that with a combination of Perl's CGI module to generate and process the form, MIME::Lite module to formulate the mail with attachment, then either Mail::Sendmail module or sendmail program. You can run into snags if the web server either blocks certain ports or does not allow you to send mail. The CGI module is included with Perl, but I had to install MIME::Lite and Mail::Sendmail (if used) in my own directory. You did not say what scripting or programming language you are using on the web server, but looking at these Perl modules might at least give you some hints. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
thks for u r responce;
i am trying to write http get and post methods using c-launguage; i am explaning in detail my problem bellow: suppose i want to access yahoo mail; so i send request http:mail.yahoo.com to server through my proxy server ; after that i am getting tht page and i sign-in and composed an email and i attached an file to my email; problem: when i am attaching a file to my email then it is keep on attaching finally proxy server and client connections closed--why?; plase answer this question; David Efflandt wrote: > On 28 Jul 2005 03:47:38 -0700, ranjitkum@gmail.com <ranjitkum@gmail.com> wrote: > > hi to all, > > how can we attach a file to email using http post method? > > Basically you would use file upload field(s) for the attachment(s) in a > multipart form, properly process it into a valid e-mail format with > attachment(s) on the server, and either handle the SMTP or hand it off to > something that does. > > I have done that with a combination of Perl's CGI module to generate and > process the form, MIME::Lite module to formulate the mail with attachment, > then either Mail::Sendmail module or sendmail program. You can run into > snags if the web server either blocks certain ports or does not allow you > to send mail. The CGI module is included with Perl, but I had to install > MIME::Lite and Mail::Sendmail (if used) in my own directory. > > You did not say what scripting or programming language you are using on > the web server, but looking at these Perl modules might at least give you > some hints. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 29 Jul 2005 21:28:17 -0700, ranjitkum@gmail.com <ranjitkum@gmail.com> wrote:
> thks for u r responce; > i am trying to write http get and post methods using c-launguage; > > i am explaning in detail my problem bellow: > suppose i want to access yahoo mail; > so i send request http:mail.yahoo.com to server through my proxy server > ; > after that i am getting tht page and i sign-in and composed an email > and > i attached an file to my email; > > problem: > when i am attaching a file to my email then it is keep on attaching > finally proxy server and client connections closed--why?; > plase answer this question; That is a bit more complicated. Your c program would need to interact with the compose web page to properly upload the attachment, which then returns to the compose page, which then is submitted to send the e-mail with attachment. It would probably be much easier if you had utilities or macros to properly compose the e-mail with proper headers and encoded attachment, and send that through an SMTP server. |
|
![]() |
| Outils de la discussion | |
|
|