diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Misc.pm | 9 |
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'}, |