|
送信の確認は、現状で標準機能としては用意してないので、マクロを使って欲
しいです。特にLDAPでの検索もってことだとなおさらマクロでないと対応出来な
いです。
マクロ用の関数として、DoLdapGrepってのが既にあるので、それでLDAPサー
バーからの検索は出来ます。
参考のマクロを作ってみました。アドレス帳に「LDAP」という名前にてLDAP
サーバーが登録されてるという前提でのマクロですけど。
loaddll "tkinfo.dll";
#i = 0;
#c = dllfunc("CountCurrentHeader", "To");
while(#i < #c ) {
$s = dllfuncstr("CurrentHeader2", "To", #i);
if( $s != "" ) {
call RetrieveEmail $s;
}
#i = #i + 1;
}
#i = 0;
#c = dllfunc("CountCurrentHeader", "Cc");
while(#i < #c ) {
$s = dllfuncstr("CurrentHeader2", "Cc", #i);
if( $s != "" ) {
call RetrieveEmail $s;
}
#i = #i + 1;
}
#c = dllfunc("CountCurrentHeader", "Bcc");
while(#i < #c ) {
$s = dllfuncstr("CurrentHeader2", "Bcc", #i);
if( $s != "" ) {
call RetrieveEmail $s;
}
#i = #i + 1;
}
#i = 0;
while( #i < #to ) {
#n = dllfunc("DoLdapGrep", $to[#i], 1, "LDAP"
, "メールアドレス", 3 );
$s = "";
if( #n != 0 ) {
$s = dllfuncstr("GetGrepResult", 0 );
}
if( $s != "" ) {
$name = dllfuncstr("GetBookItemPart", $s, -1 );
$note1 = dllfuncstr("GetBookItemPart", $s, 3 );
$note2 = dllfuncstr("GetBookItemPart", $s, 4 );
$note3 = dllfuncstr("GetBookItemPart", $s, 5 );
$to[#i] = $to[#i]
+ " 登録情報=" + $name
+ " / " + $note1
+ " / " + $note2
+ " / " + $note3;
} else {
$to[#i] = $to[#i] + " 登録されてない";
}
$total = $total + $to[#i] + "\n";
#i = #i + 1;
}
$total = $total + "\n\nこの宛先で送信してもいいですか?";
question $total;
if( result != yes ) {
#n = dllfunc("SetCancel", 1);
}
endmacro;
RetrieveEmail:
##i = 0;
while(1) {
$$s = dllfuncstr("GetEmailList", $$1, ##i);
if( $$s == "" ) {
break;
}
$to[#to] = dllfuncstr("SetEmailOnly", $$s);
#to = #to + 1;
##i = ##i + 1;
}
return;
|
|