Gossamer Forum
Home : Products : DBMan : Customization :

Forward Record mod w/image question

Quote Reply
Forward Record mod w/image question
Hello,

I have the multiple upload and forward record w/images or attachments mods installed. These two mods are working fine, but I'd like to know how to forward email with two or more attachments. Even though I selected txt, image and other files, I could only attach one file to my email. (Note: the txt, doc, image, and other files are not defined in any fields.)

Thanks for your help.

Mikan
Quote Reply
Re: [mikan] Forward Record mod w/image question In reply to
Hello,

I got it to send multiple files but here is my problem. Some of codes in db.cgi, sub forward_email:

if (-e "$in{'Graphic'}") {
$sender = new Mail::Sender
{smtp => $smtp_server,
from => ($in{'email'})
};
$sender->MailFile({to => ($in{'to_email'}),
subject => ($in{'subject'}),
msg => ($in{'emailmessage'}),
file => ("$in{'Graphic'},$in{'TEXT'},$in{'DOC'}")})
or die "$Mail::Sender::Error\n";
}
elsif (-e ("$in{'DOC'}")){
$sender = new Mail::Sender
{smtp => $smtp_server,
from => ($in{'email'})
};
$sender->MailFile({to => ($in{'to_email'}),
subject => ($in{'subject'}),
msg => ($in{'emailmessage'}),
file => ("$in{'DOC'},$in{'Graphic'}")})
or die "$Mail::Sender::Error\n";

----

In the above codes, if all variables, Graphic, TEXT, DOC are selected, that is - they are NOT empty, Sender.pm will send all files as attachments. But if one of them is empty, say TEXT, then Sender.pm dies. I'd like Sender.pm to be able to send files in varialbes Graphic and DOC. I don't know how to do this. Please help.

Thanks,

Mikan
Quote Reply
Re: [mikan] Forward Record mod w/image question In reply to
Got it to work. Got the sender.pm to send multiple attachments with any combinations. like file 1, files 2 and 3, files 1, 3 or no attachment..