Tadashi Okoshi
slash****@users*****
2006年 4月 6日 (木) 02:27:52 JST
Index: affelio/apps/diary/Diary/RetrieveMoblog.pm
diff -u affelio/apps/diary/Diary/RetrieveMoblog.pm:1.1 affelio/apps/diary/Diary/RetrieveMoblog.pm:1.2
--- affelio/apps/diary/Diary/RetrieveMoblog.pm:1.1 Thu Apr 6 02:23:58 2006
+++ affelio/apps/diary/Diary/RetrieveMoblog.pm Thu Apr 6 02:27:52 2006
@@ -52,8 +52,10 @@
debug_print("Diary::Moblog::retrieve: pass =$pop3_password");
debug_print("Diary::Moblog::retrieve: author=$author_email");
debug_print("Diary::Moblog::retrieve: tmp =$tmp_dir");
-
- my $num_msg = 0;
+
+ if($pop3_server eq ""){
+ return("");
+ }
my $parser = new MIME::Parser;
$parser->output_dir($tmp_dir);
@@ -98,10 +100,12 @@
#Authentication with "From" field
my $this_author = $entity->head->get('from');
if ($this_author =~ /($mail_regex)/o) {
- if ($author_email ne $1) {
- $popper->delete($msg_id);
- debug_print("Diary::Moblog::retrieve: Denied entry from [$1]");
- next;
+ if ($author_email ne "") {
+ if ($author_email ne $1) {
+ $popper->delete($msg_id);
+ debug_print("Diary::Moblog::retrieve: Denied entry from [$1]");
+ next;
+ }
}
}
debug_print("Diary::Moblog::retrieve: Mail from : $1\n");
@@ -189,7 +193,6 @@
# POP3ãµã¼ãã®ãã¡ã¤ã«ãåé¤
$popper->delete($msg_id);
- $num_msg++;
#####################################
#Several processing on title & body