Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: email on WIN32

by Discipulus (Deacon)
on Oct 27, 2009 at 08:57 UTC ( #803399=note: print w/ replies, xml ) Need Help??


in reply to email on WIN32


between all your options to send mail, while you ar on win32 system with an SMTP server running I often use the core solution via the Win32::OLE module.

use Win32::OLE qw(with); my $Message = Win32::OLE->new("CDO.Message"); $Message->{From}="a\@b.c"; $Message->{To}="b\@b.c"; $Message->{Bcc}="c\@b.c"; $Message->{Subject}="test subj"; $Message->{TextBody}="ahahahahahah\n\ndjhdjkfhdasjkfh"; $Message->Send()||die $Win32::OLE::LastError,$^E;
without the SMTP server locally, you have to specify which server you want use via a new object Win32::OLE->new ("CDO.Configuration") ;, and things go unfriendly ..

hth

Lor*


Comment on Re: email on WIN32
Select or Download Code
Re^2: email on WIN32
by fionbarr (Monk) on Oct 27, 2009 at 12:48 UTC
    thanks to all! I got my procedure working by initializing smtp with 'localhost'...it did work with 'mail.yahoo.com' but yahoo didn't like it and rejected the messages after the 1st few. Also Yahoo wanted authentication and that added another wrinkle.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-07-12 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (241 votes), past polls