Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How can i send email to Multiple email addresses using Email::Simple

by kamal (Sexton)
on Sep 10, 2010 at 14:39 UTC ( [id://859648]=perlquestion: print w/replies, xml ) Need Help??

kamal has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I want to be able to send email to multiple email addresses in
my $email = Email::Simple->create( header => [ To => '"My Name" <myname@something +.com>', From => '"Someone1" <some@somewhere. +com>', Subject => $subject, ], body => $body ); sendmail( $email, { transport => $transport } );
is it possible to write: From => '"Someone1" <some@somewhere.com>', '"Someone2" <some2@somewhere.com>' Thanks, -Kamal.
  • Comment on How can i send email to Multiple email addresses using Email::Simple
  • Download Code

Replies are listed 'Best First'.
Re: How can i send email to Multiple email addresses using Email::Simple
by merlyn (Sage) on Sep 10, 2010 at 16:50 UTC
    I suspect this will work:
    To => 'first@example.com, second@example.com, third@example.com'
    Please don't use names like "something.com" and "somewhere.com" in examples unless you own them. They are likely owned by people who are now a bit more angry at you. There are reserved names like "example.com" reserved for examples.

    -- Randal L. Schwartz, Perl hacker

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Re: How can i send email to Multiple email addresses using Email::Simple
by JavaFan (Canon) on Sep 10, 2010 at 15:04 UTC
    1. From says who send the mail. So, adding addresses to the From header doesn't get your mail delivered multiple times.
    2. Why ask if something is possible? Why don't you try and see?
    3. Did you read the documentation of Email::Simple?
    4. You probably need the 'Cc' header. Read the manual page how to set it.
Re: How can i send email to Multiple email addresses using Email::Simple
by tune (Curate) on Sep 11, 2010 at 11:03 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-24 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found