Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: sending the same email more than once without connecting to smtp for every To adress

by rchiav (Deacon)
on Aug 25, 2001 at 03:18 UTC ( #107758=note: print w/replies, xml ) Need Help??


in reply to sending the same email more than once without connecting to smtp for every To adress

Actually, you can do it just as you described. Just pass an array to the "to" method...
my $smtp = Net::SMTP->new($srv); $smtp->mail('root@localhost'); $smtp->to(@emails); $smtp->data(); $smtp->datasend("Your data goes here.\n"); ....
Hope this helps..
Rich
  • Comment on Re: sending the same email more than once without connecting to smtp for every To adress
  • Download Code

Replies are listed 'Best First'.
Re: Re: sending the same email more than once without connecting to smtp for every To adress
by pitbull3000 (Beadle) on Aug 25, 2001 at 03:31 UTC
    ok cool i was on the right way, is there also the possibility to send attachments with net::smtp, i already read the docs but didnt find anything. is it like sendmail that i specify the header with "content type multipart/mixed...... boundary...." if yes, how is the syntax... ;.))
      For that, you're going to want to use MIME::Lite..

      All the info you're looking for is at that link.

      Hope this helps..
      Rich

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2023-02-08 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?