Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Problem sending email with attachment

Quote Reply
Problem sending email with attachment
I'm trying t send an attachment with e-mail messages sent by GT::Mail. I'm using the following code to do it:

Code:
my $mailer = new GT::Mail(
sendmail => $CFG->{db_mail_path},
to => 'myself@domain.com',
from => 'myself@domain.com',
subject => "Subject here",
msg => "Message body goes here",
debug => 1);
$mailer->attach(
type => "text/plain",

body_path => $CFG->{admin_root_path}."/admin.cgi",
filename => 'admin.cgi');
$mailer->send() or die "Error: $GT::Mail::error";


It does send the message. BUT! Upon receiving the message, my mail client gives "Error: could not parse MIME message. Displaying as source".

What is wrong?