2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 07:56:03 +00:00

32_mailcheck.pm: use only address part of From

git-svn-id: https://svn.fhem.de/fhem/trunk@10031 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2015-11-28 12:50:08 +00:00
parent 7d1c952255
commit 089e425ff4

View File

@ -375,8 +375,10 @@ mailcheck_Read($)
my $msg_count = $client->unseen_count||0;
if ($msg_count > 0) {
my $from = $client->get_header($resp, "From");
$from =~ s/<[^>]*>//g; #strip the email, only display the sender's name
Log3 $name, 4, "from: $from";
if( $from =~ m/<([^>]*)>/ ) {
$from = $1;
}
my $subject = $client->get_header($resp, "Subject");
Log3 $name, 4, "subject: $subject";