Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

Re: [mv] HOWTO: carbon copy orders ?



We send orders to multiple recipients by defining them in the catalog.cfg
file as follows:

Variable  ORDERS_TO  person1@some.com,person2@another.com,etc@etc.com



> I saw in the archives a message from back in 1997 (posted by
> rho@Austria.EU.net) that talked about how to create a carbon copy of
> order notices.  It went like so:
> 
> [snip]
> 
> With below patch one can now define a line
> 
> CCMailOrderTo s_email
> 
> in catalog.cfg. This shall specify that an order will also be mailed as
> Cc: to an address living in the scratch var "s_email". It is the
> responsibility
> of the application engineer to set it properly.
> 
> # diff -r Vend.old Vend
> diff -r Vend.old/Config.pm Vend/Config.pm
> 79a80
>> ['CCMailOrderTo', undef, ''],
> Common subdirectories: Vend.old/Table and Vend/Table
> diff -r Vend.old/Util.pm Vend/Util.pm
> 556a557
>> my ($cc) = '';
> 561a563,568
>> my $ccconfig = $Vend::Cfg->{'CCMailOrderTo'};
>> $cc = "Cc: $Vend::Session->{'scratch'}->{$ccconfig}\n"
>> if $Vend::Session->{'scratch'}->{$ccconfig};
>> 
>> 
> 565c572
> < print Vend::MAIL "To: $to\n", $reply, "Subject: $subject\n\n", $body
> 
> ---
>> print Vend::MAIL "To: $to\n", $cc, $reply, "Subject: $subject\n\n", $body
> 
> [snip]
> 
> I have tried to use this patch, but can not get it to work.  Actually, I
> eliminated the ', $body' off the end of the print Vend... statement,
> since this appears to be redundant for MV3.14-5 (i.e., $body gets added
> later in the code).
> 
> I have the Util.pm code in the sub send_mail.  The local variable
> $ccconfig does evaluate to the proper 'CCMailOrderTo' address that I
> defne in my catalog.cfg file, but
> $Vend::Session->{'scratch'}->{$ccconfig} converts/evaluates this to ''
> (i.e., nothing).  Consequently, $cc = $cc = "Cc:
> $Vend::Session->{'scratch'}->{$ccconfig}\n" never gets activated.
> 
> I am not sure how the $Vend::Session->{'scratch'} gets loaded, but it is
> obvious that $ccconfig is not an element.
> 
> I tried setting $cc = "$Vend::Cfg->{'CCMailOrderTo'}\n" and I can see in
> my debugging log that $cc evaluates to the proper 'CCMailOrderTo'
> address.  However, the user at the defined 'CCMailOrderTo' address does
> not receive a copy.  The ORDERS_TO recipient does receive the message
> and it shows that the 'CCMailOrderTo' address was CCed.
> 
> Now, if I DO leave ', $body' in the 'print Vend...' statement, the
> 'CCMailOrderTo' gets a copy, but the 'body' of the message is
> duplicated.
> 
> Does anyone have any idea(s) about why this patch does not seem to work
> on my system?  Is there another way to send a carbon copy without adding
> another address to the ORDERS_TO variable?
> 
> I am using sendmail-8.9.3 on a RedHat6.2 system.
> 
> Thanks,
> Murrah Boswell
> 
> 
> _______________________________________________
> Minivend-users mailing list
> Minivend-users@minivend.com
> http://www.minivend.com/mailman/listinfo/minivend-users


_______________________________________________
Minivend-users mailing list
Minivend-users@minivend.com
http://www.minivend.com/mailman/listinfo/minivend-users


Search for: Match: Format: Sort by: