Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   SendMail.pm: smtp and gmail (http://www.velocityreviews.com/forums/t903215-sendmail-pm-smtp-and-gmail.html)

Davidcollins001@gmail.com 05-25-2007 12:15 PM

SendMail.pm: smtp and gmail
 
Hi,

I have just found the SendMail.pm perl module. I have been using it
for about a week to email myself backups of my important documents. I
am currently using it from withing a university network so setting up
the smtp didn't require much.

I would like to be able to use it to sent mail using my gmail account.
I have done a bit of googling and so far I have come up with one post
saying that this module doesn't have ssl yet, but that was two years
or so ago. Is this still the case? Or is it possible to connect to the
gmail smtp server?

Thanks


Skye Shaw!@#$ 05-28-2007 09:54 AM

Re: SendMail.pm: smtp and gmail
 
On May 25, 5:15 am, Davidcollins...@gmail.com wrote:
> Hi,
>
> I have just found the SendMail.pm perl module. I have been using it
> for about a week to email myself backups of my important documents. I
> am currently using it from withing a university network so setting up
> the smtp didn't require much.
>
> I would like to be able to use it to sent mail using my gmail account.
> I have done a bit of googling and so far I have come up with one post

huh, what...
http://www.google.com/search?q=SMTP+SSL+Perl

> saying that this module doesn't have ssl yet, but that was two years


Net::SMTP::SSL.

> or so ago. Is this still the case? Or is it possible to connect to the
> gmail smtp server?


Since you are using gmail, you might as well say screw plain ol' SMTP
and use one of the gmail modules. They'll allow you to "easily" take
advantage of the "features" provided by our good friends at gmail.



Davidcollins001@gmail.com 05-29-2007 09:20 PM

Re: SendMail.pm: smtp and gmail
 
Thankyou, I usually google quite well. I had found the net modules but
didn't realise I could use them for this purpose. Here come automated
email backups for my docs!

:)


Davidcollins001@gmail.com 05-30-2007 08:40 AM

Re: SendMail.pm: smtp and gmail
 
So, I thought this was going to be quite easy, and it seems like it
should be but I keep getting an error:

$ Could not connect to smtp.googlemail.com


Here is my code:

[CODE]
use Net::SMTP::SSL;

my $smtpserver='smtp.googlemail.com';
my $smtpport=465;

$smtp = Net::SMTP::SSL->new(Host => $smtpserver,
Port => $smtpport,
debug=> 1) ||
die "Could not connect to $smtpserver; $!";
[\CODE]

Is there something that I am missing? I dont get any extra info from
including the debug flag.
Thanks


Timo Jokinen 05-30-2007 08:52 AM

Re: SendMail.pm: smtp and gmail
 
Davidcollins001@gmail.com wrote:
> So, I thought this was going to be quite easy, and it seems like it
> should be but I keep getting an error:
>
> $ Could not connect to smtp.googlemail.com
>
>
> Here is my code:
>
> [CODE]
> use Net::SMTP::SSL;
>
> my $smtpserver='smtp.googlemail.com';
> my $smtpport=465;
>
> $smtp = Net::SMTP::SSL->new(Host => $smtpserver,
> Port => $smtpport,
> debug=> 1) ||
> die "Could not connect to $smtpserver; $!";
> [\CODE]
>
> Is there something that I am missing? I dont get any extra info from
> including the debug flag.
> Thanks
>


Are you sure for port? Default port for SSL is 443

br
-timppa

Davidcollins001@gmail.com 05-30-2007 09:11 AM

Re: SendMail.pm: smtp and gmail
 
So, I thought this was going to be quite easy, and it seems like it
should be but I keep getting an error:

$ Could not connect to smtp.googlemail.com


Here is my code:

[CODE]
use Net::SMTP::SSL;

my $smtpserver='smtp.googlemail.com';
my $smtpport=465;

$smtp = Net::SMTP::SSL->new(Host => $smtpserver,
Port => $smtpport,
debug=> 1) ||
die "Could not connect to $smtpserver; $!";
[\CODE]

Is there something that I am missing? I dont get any extra info from
including the debug flag.
Thanks


Davidcollins001@gmail.com 05-30-2007 09:14 AM

Re: SendMail.pm: smtp and gmail
 
>
> Are you sure for port? Default port for SSL is 443
>


The gmail page says that their smtp server uses ports 465 or 587,
neither work for me (I tried 443 and it was the same too)
(http://mail.google.com/support/bin/a...y?answer=13287)


Davidcollins001@gmail.com 05-30-2007 09:15 AM

Re: SendMail.pm: smtp and gmail
 
>
> Are you sure for port? Default port for SSL is 443
>


The gmail page says that their smtp server uses ports 465 or 587,
neither work for me (I tried 443 and it was the same too)
(http://mail.google.com/support/bin/a...y?answer=13287)


Tim Southerwood 05-30-2007 10:42 AM

Re: SendMail.pm: smtp and gmail
 
Davidcollins001@gmail.com wrote:

>>
>> Are you sure for port? Default port for SSL is 443
>>

>
> The gmail page says that their smtp server uses ports 465 or 587,
> neither work for me (I tried 443 and it was the same too)
> (http://mail.google.com/support/bin/a...y?answer=13287)


587 usually requires TLSfollowed by an SMTP AUTH, not SSL - and it certainly
accepts an initial connection from telnet.

465 I think is the one that you want for SSL - that is accepting connections
too and it looks like an SSL connect.

Cheers

Tim

Tad McClellan 05-30-2007 11:03 AM

Re: SendMail.pm: smtp and gmail
 
Davidcollins001@gmail.com <Davidcollins001@gmail.com> wrote:

> I keep getting an error:
>
> $ Could not connect to smtp.googlemail.com

^^^^^^^^^^


> $smtp = Net::SMTP::SSL->new(Host => $smtpserver,
> Port => $smtpport,
> debug=> 1) ||
> die "Could not connect to $smtpserver; $!";

^^^^

Where is the semicolon and the rest of the message?


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas


All times are GMT. The time now is 04:35 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.