Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Oh Mighty monks,
I have a bit of a question, that in my googling I have not come up with a sure fire answer (yes this is a some what admission that I have not tested and failed enough, but I hope that is ok).
Essentially I am running on Windows Vista (please limit the scoffing) ActiveState Perl 5.10, I have a script that is launched by Windows Task Scheduler, where it collects information of the internet, puts into a MySQL (natch) database on my computer if there is new information. I would like to have my code send me an email if the database is updated.
Here is what I am looking for:
1) I would like to only use modules that go through the PPM that ActiveState has (maybe I am being stupid, please let me know if that is a dumb requirement)
2) I don't want to pay for the email service.
The reason that I ask, is that if I look for SMTP modules on ActiveState PPM there are options, but to use Gmail it looks like I need SSL option which is not in ActiveState. So is there something that I am missing, i.e. I don't need SSL, or perhaps Yahoo, MSN or some other free email service that will work with what is in ActiveState just to send an email?
Thanks in advance for the knowledge!
Re: Sending email from a Vista machine with ActiveState PPM modules
by randyk (Parson) on Apr 11, 2008 at 03:58 UTC
|
If you don't mind getting ppm packages from repositories other than ActiveState's, you could try
Mail::Webmail::Gmail; the links at the bottom of this page show repositories that have it, while following the prerequisites links will show repositories that have them. | [reply] [Watch: Dir/Any] |
Re: Sending email from a Vista machine with ActiveState PPM modules
by tachyon-II (Chaplain) on Apr 11, 2008 at 05:43 UTC
|
| [reply] [Watch: Dir/Any] |
Re: Sending email from a Vista machine with ActiveState PPM modules
by Anonymous Monk on Apr 11, 2008 at 11:27 UTC
|
So for the two responses:
1) What email services will this work with? For example I tried this with Gmail, and no luck (I think that they require something else). So I guess the real question was a two parter, 1) what Code to use (provided) 2) What email service should I use it with? <- This last one is what I have not really found any answers on (at least with ActiveState PPM)
2)With the Mail::WebMail::Gmail from a non-ActiveState PPM, how do I install this (with all the various dependencies) on a Windows machine?
Thank you in advance for all the help. | [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] |
|
So I tired following the directions, I got down to the install of the Gmail package and I get this error:
Checking if your kit is complete...
Looks good
Writing Makefile for Mail::Webmail::Gmail
'nmake' is not recognized as an internal or external command, operable program or batch file.
MINCUS/Mail-Webmail-Gmail-1.09.tar.gz
nmake -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
I tried running this from the directory that I installed/ran the nmake from the link...
Any help?
| [reply] [Watch: Dir/Any] |
|
|
|
|
With the Mail::WebMail::Gmail from a non-ActiveState PPM, how do I install this (with all the various dependencies) on a Windows machine
You first add the necessary repositories to your ppm repository list. The 3 reps listed at randyk's webpage will probably suffice. Looking at ppm help, I think this means that you run the following three commands:
ppm repo add http://www.bribes.org/perl/ppm
ppm repo add http://trouchelle.com/ppm10/
ppm repo add http://cpan.uwinnipeg.ca/PPMPackages/10xx/
That done, it should then just be a matter of running:
ppm install Mail-WebMail-Gmail
Cheers,
Rob | [reply] [Watch: Dir/Any] [d/l] [select] |
|
Thank you for your advice! But I have an error, I am running this code (from the authors site)
use strict;
use Crypt::SSLeay;
use HTTP::Cookies;
use HTTP::Headers;
use HTTP::Request::Common;
use LWP::UserAgent;
use Mail::Webmail::Gmail;
my ( $gmail ) = Mail::Webmail::Gmail->new(username => 'secret', passwo
+rd => 'also_secret' );
### Test Sending Message ####
my $msgid = $gmail->send_message( to => 'blah@yahoo.com', subject => t
+ime(), msgbody => 'Test' ); print "Msgid: $msgid\n";
if ( $msgid ) {
if ( $gmail->error() ) {
print $gmail->error_msg();
} else {
### Create new label ###
my $test_label = "tl_" . time();
$gmail->edit_labels( label => $test_label, action => 'create'
+);
if ( $gmail->error() ) {
print $gmail->error_msg();
} else {
### Add this label to our new message ###
$gmail->edit_labels( label => $test_label, action => 'add'
+, 'msgid' => $msgid );
if ( $gmail->error() ) {
print $gmail->error_msg();
} else {
print "Added label: $test_label to message $msgid\n";
}
}
}
}
I then get the following error:
Use of uninitialized value $host in concatenation (.) or string at C:/
+Perl/lib/LWP/Protocol/http.pm line 25.
Use of uninitialized value $page in pattern match (m//) at C:/Perl/sit
+e/lib/Mail/Webmail/Gmail.pm line 1425.
Msgid:
Use of uninitialized value $msgid in concatenation (.) or string at E:
+\Bioreka\gmail\test.pl line 12.
I found this here:
http://rt.cpan.org/Public/Bug/Display.html?id=21094
I did this:
https://www.google.com/accounts/UnlockCaptcha?
And no luck.... any thoughts?
| [reply] [Watch: Dir/Any] [d/l] [select] |
Re: Sending email from a Vista machine with ActiveState PPM modules
by drblove27 (Sexton) on Apr 11, 2008 at 16:14 UTC
|
For what it is worth, I am not tied to Gmail, I am willing to use whatever free email service that actually works... Any thoughts anyone?
I have learned by playing that sendmail works if you have your own sendmail server, which I don't... I have a gmail and yahoo.. willing to use anything, just to try and get this running.... | [reply] [Watch: Dir/Any] |
|
Hi All, I am posting this reply for people who may be reading this thread if they have the same questions. I finally got this to work, but not for free. Essentially I signed up for Yahoo Mail Plus (20 bucks a year), which allowed me to access their SMTP server (smtp.mail.yahoo.com) and used Mail::SendEasy (downloadable from ActiveState PPM 5.10). Here are the settings that I used
use Mail::SendEasy ;
my $mail = new Mail::SendEasy(
smtp => 'smtp.mail.yahoo.com' ,
user => 'yahoo_id' , #no @yahoo.com
pass => 'yahoo_password' ,
) ;
my $status = $mail->send(
from => 'yahoo_id@yahoo.com' ,
from_title => 'Whatever' ,
reply => 'yahoo_id@yahoo.com' ,
error => 'yahoo_id@yahoo.com' ,
to => 'where_ever' ,
cc => 'where_ever_2' ,
subject => "MAIL Test" ,
msg => "The Plain Msg..." ,
html => "<b>The HTML Msg...</b>" ,
msgid => "0101" ,
) ;
if (!$status) { print $mail->error ;}
Also for what it is worth, this exact method did not work for Gmail (I never could get any code up and running to use GMail) | [reply] [Watch: Dir/Any] [d/l] |
|
|