| |
415 |
415 |
} |
| |
416 |
416 |
|
| |
417 |
417 |
# Decide which sender to use |
| |
418 |
418 |
set fixed_sender [parameter::get -parameter "FixedSenderEmail" \ |
| |
419 |
419 |
-package_id $mail_package_id] |
| |
420 |
420 |
|
| |
421 |
421 |
|
| |
422 |
422 |
if { $fixed_sender ne "" && !$use_sender_p} { |
| |
423 |
423 |
set from_addr $fixed_sender |
| |
424 |
424 |
} |
| |
425 |
425 |
|
| |
426 |
426 |
# Set the Reply-To |
| |
427 |
427 |
if {$reply_to eq ""} { |
| |
428 |
428 |
set reply_to $from_addr |
| |
429 |
429 |
} |
| |
430 |
430 |
|
| |
431 |
431 |
# Get any associated data indicating need to sign message-id |
| |
432 |
432 |
|
| |
433 |
433 |
# associate a user_id |
| |
434 |
434 |
set rcpt_id 0 |
| |
435 |
|
if { [llength $to_addr] eq 1 } { |
| |
|
435 |
if { [llength $to_addr] == 1 } { |
| |
436 |
436 |
set rcpt_id [party::get_by_email -email $to_addr] |
| |
437 |
437 |
if {$rcpt_id eq ""} { |
| |
438 |
438 |
set rcpt_id 0 |
| |
439 |
439 |
} |
| |
440 |
440 |
} |
| |
441 |
441 |
|
| |
442 |
442 |
|
| |
443 |
443 |
# Set the message_id |
| |
444 |
444 |
# message-id gets signed if parameter defaults not passed |
| |
445 |
445 |
set message_id [acs_mail_lite::unique_id_create \ |
| |
446 |
446 |
-object_id $object_id \ |
| |
447 |
447 |
-package_id $package_id \ |
| |
448 |
448 |
-party_id $rcpt_id] |
| |
449 |
449 |
|
| |
450 |
450 |
|
| |
451 |
451 |
# Set originator header |
| |
452 |
452 |
set originator_email [parameter::get -parameter "OriginatorEmail" \ |
| |
453 |
453 |
-package_id $mail_package_id] |
| |
454 |
454 |
|
| |
455 |
455 |
# Decision based firstly on parameter, |