summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2005-06-06 17:00:57 +0000
committerivan <ivan>2005-06-06 17:00:57 +0000
commit38887a10a47f0e35057223faaffcf32c15c5a9f5 (patch)
tree0c76151a93ce845ae973131f5d38179aac8c37ff /FS
parente6af2112aae23d3d15a24e70978c3c277a93f2f9 (diff)
fix message ID generation for ancient perl, bah
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Misc.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm
index 1bb1ae152..74f73a234 100644
--- a/FS/FS/Misc.pm
+++ b/FS/FS/Misc.pm
@@ -118,8 +118,13 @@ sub send_email {
}
- $options{'from'} =~ /\@([\w\.\-]+)/ or $1 = 'example.com';
- my $message_id = join('.', rand()*(2**32), $$, time). "\@$1";
+ my $domain;
+ if ( $options{'from'} =~ /\@([\w\.\-]+)/ ) {
+ $domain = $1;
+ } else {
+ $domain = 'example.com';
+ }
+ my $message_id = join('.', rand()*(2**32), $$, time). "\@$domain";
my $message = MIME::Entity->build(
'From' => $options{'from'},