469,352 Members | 2,140 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

Needed Help in using SendMail.pl

hi

m having a script to send mail.
can u please tell me wat ll be the preconditions and wat needs to be installed inaddition to perl

i hav net and perl installed
Oct 11 '06 #1
8 5208
hi

m having a script to send mail.
can u please tell me wat ll be the preconditions and wat needs to be installed inaddition to perl

i hav net and perl installed

i have a script to send a mail through microsoft outlook.
if outlookn is installed on your machine then you can you Win32::OLE module of perl for sending mail through outlook.

if you want then I can post it
Oct 12 '06 #2
Hi Friends,

As I am also having the same problem in my widows machine. Actually I have a linux machi9ne where perl is installed and there is the sendmail.pm file available but in windows its not detecting that file so I think this wil be helpfull for me also . So if possible then please post the module for windows. I will be gratefull to you.

Regards,
Chittaranjan. :)
Oct 12 '06 #3
geek491
21
hi

m having a script to send mail.
can u please tell me wat ll be the preconditions and wat needs to be installed inaddition to perl

i hav net and perl installed
Hi Nagendra

If your intention is to send a mail via a perl script and if u have a mail box server then this code will help.

use Mail::SendEasy ;

my $mail = new Mail::SendEasy(
smtp => 'enter your mail box server address here' ,
user => 'user name for mail box' ,
pass => password for mail box ,
) ;

my $status = $mail->send(
from => 'abc@abc.com' ,
from_title => 'Name' ,
reply => 'xyz@xyz.com' ,
error => 'xyz@xyz.com' ,
to => 'xyz@xyz.com' ,
cc => '' ,
subject => "MAIL Test" ,
msg => "The Plain Msg..." ,
html => "<b>The HTML Msg...</b>" ,
msgid => "0101" ,
anex => c:\log.txt
) ;

if (!$status) { print $mail->error ;}

If any issues let me know it at geek491@yahoo.co.in
Oct 13 '06 #4
Hi geek491,

The code you have posted here is not working in my windows system. Actually I have installed Active Perl in my windows system where it is not able to find the sendmail.pm file also your sendeasy.pm file. So is there any solution for this please let me know I will be waiting for this.


Thanks
Chittaranjan :)
Oct 16 '06 #5
geek491
21
Hi geek491,

The code you have posted here is not working in my windows system. Actually I have installed Active Perl in my windows system where it is not able to find the sendmail.pm file also your sendeasy.pm file. So is there any solution for this please let me know I will be waiting for this.


Thanks
Chittaranjan :)

Have to tried to install that module? If you have not installed this module then the perl interpreter wont be able to find the sendeasy.pm file.

To install the module in active perl.. goto start--> active perl --> perl package manager->

you will be taken to a command prompt which looks like this.


ppm>

now here you need to type in

ppm> install Mail-SendEasy

This will install the module provided you have internet connection. If you work for some company then if internet is blocked you can set the following environment variables in your system and perl will be able to install the modules.


HTTP_proxy http://abc.com:8080
HTTP_proxy_user Your proxy userid
HTTP_proxy_pass Your proxy password

to do this right click on my computer and select properties --> advanced --> environment variables there under user variables you can declare them.

Once the module is installed you will have no problem running the above script. Remember perl doesnt come with all the modules you need to externally install some to get the job done.
Oct 17 '06 #6
Hi geek491,

First of all thanks a lot for helping me. But still I am having some problems when I am trying to do as you had said ran the command you have given in the perl package manager then it is asking for proper port and as you have said i had set the environment variables to the links you have posted here. But its not detecting that. So what wil be next solution for this please let me know.

Thanks Again,
Chittaranjan :)
Oct 17 '06 #7
geek491
21
Hi geek491,

First of all thanks a lot for helping me. But still I am having some problems when I am trying to do as you had said ran the command you have given in the perl package manager then it is asking for proper port and as you have said i had set the environment variables to the links you have posted here. But its not detecting that. So what wil be next solution for this please let me know.

Thanks Again,
Chittaranjan :)
Quite a pickle :)
Ok will search for nmake.exe file in google and download it. Execute it and you will get 3 files...now copy paste these files inside perl's bin folder.

now goto www.cpan.org --> modules and distributions.... search for the module that u want.... Mail::SendEasy

inside the page there will be link Download: Mail-SendEasy-1.2.tar.gz

click it and download the module to your system. Then unzip it.... using a command prompt go to that folder that u unzipped now and then type these commands in order.


c:\folder_name\>perl makefile.pl
c:\folder_name\>nmake
c:\folder_name\>nmake test
c:\folder_name\>nmake install

Make sure no errors pop up...

this will install the perl module the hard way but it will work. :)
Oct 17 '06 #8
Hi geek491,

Thanks a lot that works great. as per your instruction I have installed that and I am able to send mail properly. I have also installed the sendmail package.

But one more problem I have now that is I have a form in .pl file where i am entering the data and after entering data when I am clicking submit button then it will send a mail to the corresponding address i have given in the coding itself.
So there I am using the sendmail.pm because there i have to make some coding differences to use sendmail and sendeasy modules. when I am running the code then no problem in form but after clicking submit button i am getting error "Malformed multipart POST" where it suppose to send an mail to the address I have given. So can you please tell me what will be the problem now.

You are simply great :) :) :)

Chittaranjan :)
Oct 17 '06 #9

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Babaloo | last post: by
4 posts views Thread by jim | last post: by
3 posts views Thread by David P. Jessup | last post: by
1 post views Thread by Gaz | last post: by
6 posts views Thread by atinti | last post: by
jhoborg
2 posts views Thread by jhoborg | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.