Gossamer Forum
Quote Reply
GT::Mail CC
Hi,

How do you send a CC:: with GT::Mail?
Nothing metioned in the docs.

use GT::Mail;

# Create and Sending
GT::Mail->send (
smtp => 'gossamer-threads.com',
to => 'scott@gossamer-threads.com',
from => 'scott@gossamer-threads.com',
subject => 'Hello!!',
msg => 'I am a text email'
) or die "Error: $GT::Mail::error";

# Parsing and sending
my $mail = new GT::Mail (debug => 1);


# Parse an email that is in a file called mail.test my $parser = $mail->parse ('mail.test') or die "Error: $GT::Mail::error"; # Change who it is to $parser->set ("to", 'scott@gossamer-threads.com');

# Add an attachment to it $mail->attach ( type => 'text/plain', encoding => '-guess', body_path => 'Mail.pm', filename => 'Mail.pm' ); # Send the email we just parsed and modified $mail->send (sendmail => '/usr/sbin/sendmail') or die "Error: $GT::Mail::error";
Quote Reply
Re: [giovanni] GT::Mail CC In reply to
I think you can just add

cc => 'foo@bar.com'

to the list of arguments

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] GT::Mail CC In reply to
Hi Ivan,

I tried that and no second email was sent. I'll try it again though. Thanks for your help.
Quote Reply
Re: [giovanni] GT::Mail CC In reply to
You could also have a look at GT::Mail::Send, to see what it does. Then you can find out what arguments you can pass.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] GT::Mail CC In reply to
Hi,

I had a look through all of the documents for GT::Mail, including GT::Mail::Send, and I did not see any mention of anything similar to a CC: argument.
Quote Reply
Re: [giovanni] GT::Mail CC In reply to
Nevertheless, I have tried it again and it works.

Which is nice.