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

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

by kamal (Sexton)
on Sep 10, 2010 at 14:39 UTC ( #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
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 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 tune (Curate) on Sep 11, 2010 at 11:03 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
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? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2014-08-20 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (124 votes), past polls