home *** CD-ROM | disk | FTP | other *** search
Wrap
EmailáUtility #EmailáUtility on #EmailáUtility end on 1:load:email.init ############################ Do Not edit anything above this line ############################ on 1:connect: { .disable #getmail .disable #mail } alias email.init { if $exists($mircdirdata) == $false run command.com /c md $mircdirdata if %color1 == $null || %color2 == $null || %color3 == $null || %color4 == $null { set %color1 12 | set %color2 2 | set %color3 10 | set %color4 14 } .events on set %newaddress Add Address echo %color2 -s Successfully loaded $+ %color3 E-Mail script echo %color2 -s You may now press $+ %color1 F5 $+ %color2 to set up the script. } alias email { set %window @E-MailáSetup if $window(%window).state == $null window %window 160 90 300 126 %window Arial bold 12 else window %window $window(%window).x $window(%window).y 300 126 %window Arial bold 12 if $line(%window,0) == 0 for 1 6 aline -c0 %window - rline %window 1 $+ %color3 ============== $+ %color4 E-MailSetup $+ %color3 ============== if %emailaddress [ $+ [ %currentaddress ] ] != $null rline %window 2 $+ %color2 E-Mail address: $+ %color1 %emailaddress [ $+ [ %currentaddress ] ] else rline %window 2 $+ %color2 E-Mail address:4 None Set if %pop [ $+ [ %currentaddress ] ] != $null rline %window 3 $+ %color2 Pop server address: $+ %color1 %pop [ $+ [ %currentaddress ] ] else rline %window 3 $+ %color2 Pop server address:4 None Set if %smtp == $null rline %window 4 $+ %color2 Mail Transfer address:4 None Set else rline %window 4 $+ %color2 Mail Transfer address: $+ %color1 %smtp if %password [ $+ [ %currentaddress ] ] != $null rline %window 5 $+ %color2 E-Mail password for Pop access: $+ %color1 $pass(%password [ $+ [ %currentaddress ] ] ) else rline %window 5 $+ %color2 E-Mail password for Pop access:4 None Set rline %window 6 $+ %color3 ======= $+ %color4 $+ Right click to change settings $+ %color3 $+ ======= } menu channel { E-Mail Server .Change Setup:F5 .- .Check E-mail:F1 .Send E-mail:F2 } menu status { E-Mail Server .Change Setup:F5 .- .Check E-mail:F1 .Send E-mail:F2 } menu menubar { E-Mail Server .Change Setup:F5 .- .Check E-mail:F1 .Send E-mail:F2 } alias F1 { if $chat($me).status == $null { if %pop.ip [ $+ [ %currentaddress ] ] == $null || %emailaddress [ $+ [ %currentaddress ] ] == $null || %password [ $+ [ %currentaddress ] ] == $null { echo 4 -a Error in setup echo %color2 -a Please press $+ %color1 F5 $+ %color2 to correct this error } else { .msg $me DCC CHAT CHAT %pop.ip [ $+ [ %currentaddress ] ] 110 .enable #check .timer300 60 60 invalid unset %lines unset %attach unset %reply.button if $group(#mail).status == on echo -a $+ %color2 Checking Mail, please wait. window -c @E-MailáChecker window @E-MailáChecker 50 60 530 255 @E-MailáChecker Arial bold 12 for 1 14 aline @E-MailáChecker 0- rline @E-MailáChecker 1 $+ %color2 Connecting to mail server: $+ %color1 %pop rline @E-MailáChecker 2 $+ %color2 Please stand by until connection has been established. rline @E-MailáChecker 3 $+ %color4 ======================================================================== } } else { if %number > %messages { rline @E-MailáChecker $line(@E-MailáChecker,0) 4 Error: $+ %color2 No more messages on server. halt } set %topline $line(@E-MailáChecker,0) dec %topline 3 .enable #getmail unset %subject unset %rcpt set %rotation startnew if $chat($me).status == active msg = $+ $me retr %number } } alias F2 { if $chat($me).status == $null { if %smtp == $null || %emailaddress [ $+ [ %currentaddress ] ] == $null { echo 4 -a Error in setup echo %color2 -a Please press $+ %color1 F5 $+ %color2 to correct this error } else { .remove $mircdirdata\email.txt set %rcpt $$?="Who would you like to email?" set %subject $?="Please enter E-Mail Subject" send.email unset %replying } } else { set %delete [ [ %number ] - 1 ] msg = $+ $me dele %delete set %lines $line(@E-MailáChecker,0) dec %lines rline @E-MailáChecker %lines $+ %color2 $+ Message $+ %color1 %delete $+ %color2 $+ has been deleted unset %delete } } alias send.email { set %window @MailáEntryáWindow window -e %window 50 60 530 255 %window Arial Bold 12 for 1 12 aline %window 0- set %lines $line(%window,0) rline %window %lines $+ %color2 $+ Type message in the box below. Enter $+ %color1 <done> $+ %color2 on a single line to end message. dec %lines rline %window %lines $+ %color2 $+ Message to: $+ %color1 %rcpt $+ %color2 Subject: $+ %color1 %subject dec %lines rline %window %lines $+ %color4 $+ ------------------------------------------------------------------------------------------------------------------------------ } menu @MailáEntryáWindow { dclick cancel.send Cancel:cancel.send } alias cancel.send { window -c @MailáEntryáWindow if %replying { .enable #check .msg $me DCC CHAT CHAT %pop.ip [ $+ [ %currentaddress ] ] 110 set %attach $true } } alias F3 closeemail alias closeemail { if $chat($me).status == $null { if $window(@E-MailáChecker).state == normal { window -c @E-MailáChecker .disable #getmail halt } setup } else { window -c @E-MailáChecker .disable #getmail .timer300 off close -c $me } } alias F4 reply.email alias reply.email { if $chat($me).status == $null general else { close -c $me set %replying $true send.email set %total $lines($mircdirdata\email.txt) for 1 %total display.reply } } alias display.reply { set %temp %loop - 1 set %line %total - %temp iline %window %lines $+ %color2 $+ $read -l $+ %line $mircdirdata\email.txt } alias F5 { if %color1 == $null || %color2 == $null || %color3 == $null || %color4 == $null { set %color1 12 | set %color2 2 | set %color3 10 | set %color4 14 } if $window(@E-MailáSetup).state == normal window -c @E-MailáSetup else email } alias SF2 { echo %color2 -a Retrying transfer to [ $+ %color1 $+ %rcpt $+ $+ %color2 $+ ] | send.message } on 1:input: { if $left($1,1) != / && $active == @MailáEntryáWindow { set %lines $line(@MailáEntryáWindow,0) dec %lines 2 if $1- == <done> { set %sending.mail 0 .msg $me DCC CHAT CHAT %smtp.ip 25 $+ rline @MailáEntryáWindow %lines $+ %color4 $+ ------------------------------------------- $+ %color1 $+ Now Sending Message $+ %color4 $+ --------------------------------------------------------------- .timer 1 3 window -c @MailáEntryáWindow .timer300 60 60 invalid .enable #mail halt } if $len($1-) > 80 chops write.mail 80 $1- else { iline @MailáEntryáWindow %lines $+ %color2 $1- write $mircdirdata\email.txt $1- } halt } } alias forward { close -c $me set %rcpt $$?="Forward message to whom?" :back set %comments $$?="Add any comments to forward (y/n)" if %comments !isin yn goto back .remove $mircdirdata\email.txt set %lines $line(@E-MailáChecker,0) dec %lines 4 set %replying $true savebuf %topline $+ - $+ %lines @E-MailáChecker $mircdirdata\email.txt set %subject Fwd: From %emailaddress [ $+ [ %currentaddress ] ] if %comments == y { write $mircdirdata\email.txt ========================================================== write $mircdirdata\email.txt Message forwarded from: %emailaddress [ $+ [ %currentaddress ] ] write $mircdirdata\email.txt ========================================================== send.email set %total $lines($mircdirdata\email.txt) for 1 %total display.reply for 1 2 iline %window %lines 0- } else send.message } alias send.message { set %sending.mail 0 .msg $me DCC CHAT CHAT %smtp.ip 25 $+ .timer 1 3 window -c @MailáEntryáWindow .timer300 60 60 invalid .enable #mail } alias sendmail { set %message $read -l $+ %loop $mircdirdata\email.txt msg = $+ $me $strip(%message) unset %message } #mail off on 1:chatopen:if $nick == $me { msg = $+ $me helo $ip } on 1:chat:*: { inc %sending.mail if $nick == $me && %sending.mail == 1 { .timer300 off msg = $+ $me mail from: %email msg = $+ $me rcpt to: %rcpt msg = $+ $me data msg = $+ $me To: %rcpt msg = $+ $me From: " $+ $me $+ " < $+ %emailaddress [ $+ [ %currentaddress ] ] $+ > msg = $+ $me Subject: %subject msg = $+ $me X-Mailer: Hawkee Pro v2.5 Mailer for 1 $lines($mircdirdata\email.txt) sendmail msg = $+ $me . } elseif %sending.mail > 5 && $nick == $me { msg = $+ $me quit close -c $me if %replying { if $window(@E-MailáChecker).state == normal rline @E-MailáChecker $line(@E-MailáChecker,0) $+ %color2 $+ $str(33,$chr(160)) ( $+ %color1 $+ E-mail message has been successfully transferred $+ %color2 $+ ) .enable #check .msg $me DCC CHAT CHAT %pop.ip [ $+ [ %currentaddress ] ] 110 set %attach $true } echo %color2 -s E-mail message successfully sent to [ $+ %color1 $+ %rcpt $+ $+ %color2 $+ ] unset %rcpt unset %subject unset %message .disable #mail } } #mail end #check off on 1:chat:*: { if $nick == $me { .timer300 off set %email %emailaddress [ $+ [ %currentaddress ] ] set %password %password [ $+ [ %currentaddress ] ] if %password == $null set %password wrongpass set %pos $pos(%email,@) set %pos [ %pos - 1 ] rline @E-MailáChecker 1 $+ %color2 Connection established with mail server: $+ %color1 %pop rline @E-MailáChecker 2 $+ %color2 Now sending login info for: $+ %color1 %email msg = $+ $me user $left(%pos,%email) msg = $+ $me pass %password msg = $+ $me stat msg = $+ $me last .disable #check .enable #getmail set %rotation 1 } } #check end #getmail off on 1:chat:*: { if $nick == $me { if -ERR isin $parms { set %lines $line(@E-MailáChecker,0) rline @E-MailáChecker 12 $+ %color4 ======================================================================== rline @E-MailáChecker %lines $+ %color2 $+ Please press $+ %color1 F5 $+ %color2 to re-enter login information dec %lines rline @E-MailáChecker %lines 4Error: $+ %color2 $2- close -c $me .disable #getmail .disable #check } if %rotation == 1 || %rotation == 2 { inc %rotation | halt } elseif %rotation == 3 { set %messages $2 if %attach != $true { rline @E-MailáChecker 2 $+ %color2 User logged in: $+ %color1 %email rline @E-MailáChecker 13 $+ %color4 ======================================================================== } inc %rotation } elseif %rotation == 4 { if $2 < %messages { set %number $2 inc %number set %newmessages %messages - $2 if %attach != $true rline @E-MailáChecker 14 $+ %color2 New messages detected: $+ %color1 %newmessages $+ %color2 $+ Press $+ %color1 F1 $+ %color2 to read message $+ %color1 %number $+ %color2 $+ of $+ %color1 %messages } elseif %messages > 0 { if %attach != $true { set %number 1 rline @E-MailáChecker 14 $+ %color1 0 $+ %color2 unread messages detected. $+ %color1 %messages $+ %color2 $+ detected on server. Press $+ %color1 F1 $+ %color2 to read message $+ %color1 1 } } else { close -c $me if %attach != $true rline @E-MailáChecker 14 $+ %color2 No messages on server $+ %color1 Closing connection } .disable #login if (%attach) { unset %attach } set %rotation startnew } elseif %rotation == startnew { set %go 0 set %ready 0 set %lines $line(@E-MailáChecker,0) if %number > %messages set %remaining $+ %color1 <None> $+ %color2 You may close the connection by pressing $+ %color1 F3 else set %remaining %number $+ %color2 $+ of $+ %color1 %messages $+ %color2 $+ Press $+ %color1 F1 $+ %color2 or double click on this window to read next message. rline @E-MailáChecker %lines $+ %color2 $+ Current message: $+ %color1 %remaining dec %lines rline @E-MailáChecker %lines $+ %color1 F2: $+ %color2 Delete message. $+ %color1 F3: $+ %color2 Close connection. dec %lines rline @E-MailáChecker %lines $+ %color4 ======================================================================== unset %rotation } else { if ( Content-Disposition: isin $1- && filename isin $1- ) || ( Content-Type: isin $1- && application/octet-stream isin $1- ) { close -c $me set %lines $line(@E-MailáChecker,0) dec %lines 2 iline @E-MailáChecker %lines $chr(160) iline @E-MailáChecker %lines $+ %color2 $+ $str(20,$chr(160)) Reconnecting to mail server in order to skip Attachment, please wait iline @E-MailáChecker %lines $+ %color3 $+ $str(35,$chr(160)) ********************************************************** iline @E-MailáChecker %lines $+ %color2 $+ $str(53,$chr(160)) File name: $+ %color1 $2- iline @E-MailáChecker %lines $+ %color2 $+ $str(38,$chr(160)) Attachment Detected, cannot retrieve with mIRC iline @E-MailáChecker %lines $+ %color3 $+ $str(35,$chr(160)) ********************************************************** iline @E-MailáChecker %lines $chr(160) set %attach $true inc %number .msg $me DCC CHAT CHAT %pop.ip [ $+ [ %currentaddress ] ] 110 .enable #check halt } if $parms == $null inc %ready set %lines $line(@E-MailáChecker,0) dec %lines 2 if From isin $1 && %ready == 0 { inc %go set %checkfrom 1 :loop if $ [ $+ [ %checkfrom ] ] == $null goto end if @ isin $ [ $+ [ %checkfrom ] ] { set %address $ [ $+ [ %checkfrom ] ] set %rcpt $remove(%address,") set %rcpt $remove(%rcpt,<) set %rcpt $remove(%rcpt,>) goto end } inc %checkfrom goto loop :end unset %checkfrom unset %address set %reply.button Reply to Current iline @E-MailáChecker %lines $+ %color2 $1 $+ $+ %color1 $2- set %lines $line(@E-MailáChecker,0) dec %lines if %rcpt == $null rline @E-MailáChecker %lines $line(@E-MailáChecker,%lines) $+ %color2 No reply address found else rline @E-MailáChecker %lines $line(@E-MailáChecker,%lines) $+ %color1 F4: $+ %color2 Reply to: $+ %color1 %rcpt } elseif Subject isin $1 && %ready == 0 { iline @E-MailáChecker %lines $+ %color2 $1 $+ $+ %color1 $2- | inc %go | set %subject $2- } elseif Reply-To: isin $1 && %ready == 0 halt elseif Status: isin $1- && RO isin $parms && %ready == 0 iline @E-MailáChecker %lines $+ %color2 ( $+ %color3 $+ Message has been viewed already $+ %color2 $+ ) elseif To isin $1 && %ready == 0 { iline @E-MailáChecker %lines $+ %color2 $1 $+ $+ %color1 $2- | inc %go } elseif Date isin $1 && %ready == 0 { iline @E-MailáChecker %lines $+ %color2 $1 $+ $+ %color1 $2- inc %go write -c $mircdirdata\email.txt On $2- $+ , you wrote: } elseif $1 == $null { iline @E-MailáChecker %lines $chr(160) write $mircdirdata\email.txt > } elseif $1- == . { inc %number | .disable #getmail } elseif %go >= 3 && %ready >= 1 { if $len($1-) > 80 chops check.mail 80 $1- else { iline @E-MailáChecker %lines $+ %color2 $1- write $mircdirdata\email.txt > $1- } } } } } #getmail end alias chops { set %count $len($3-) / $2 inc %count unset %piece set %phrase $3- donefor 1 $1 $2 } alias write.mail { set %message $chop(%loop,$1,%phrase) iline @MailáEntryáWindow %lines $+ %color2 %message write $mircdirdata\email.txt %message inc %lines } alias check.mail { set %message $chop(%loop,$1,%phrase) iline @E-MailáChecker %lines $+ %color2 %message write $mircdirdata\email.txt > %message inc %lines } alias chop { if $1 != 1 inc %spot $2 else { set %spot 1 | unset %piece } set %check [ [ %spot ] + [ $2 ] ] if %check <= $len($3-) { set %chunk $mid($3-,%spot,$2) if %piece != $null { set %chunk [ [ %piece ] $+ [ %chunk ] ] dec %spot $len(%piece) set %chunk $mid(%chunk,1,$2) unset %piece } } else { if %piece != $null set %chunk [ [ %piece ] $+ [ $mid($3-,%spot,$2) ] ] else set %chunk $mid($3-,%spot,$2) unset %done return %chunk } set %position [ [ %spot ] + [ $len(%chunk) ] ] set %next [ [ %position ] - 1 ] if $asc($mid($3-,%next,1)) == 32 || $asc($mid($3-,%position,1)) == 32 return %chunk set %spaces $count(%chunk,$chr(32)) if %spaces == 0 return %chunk set %range 1 $+ - $+ %spaces set %newchunk $gettok(%chunk,%range,32) inc %spaces set %piece $gettok(%chunk,%spaces,32) return %newchunk :end } menu @E-MailáSetup { dclick window -c @E-MailáSetup | F1 Your Address .%emailaddress1:activateaddress 1 .%emailaddress2:activateaddress 2 .%emailaddress3:activateaddress 3 .%emailaddress4:activateaddress 4 .%emailaddress5:activateaddress 5 .- .%newaddress:newemail .%removeaddress:delemail Servers .Post Office Server (POP):set %pop $+ %currentaddress $$?="Please enter your mail server's POP domain" | set %pop %pop [ $+ [ %currentaddress ] ] | checkserver pop .Send Mail Server (SMTP):set %smtp $$?="Please enter your servers SMTP address" | checkserver smtp Password .Set:set %password $+ %currentaddress $$?="Please enter your E-Mail password" | set %password %password [ $+ [ %currentaddress ] ] | email .- .Hide:set %hide true | email .Display:set %hide false | email - Close:window -c @E-MailáSetup } alias checkserver { .enable #checkdomain if $1 == pop { if $window(@E-MailáSetup).state == normal rline @E-MailáSetup 3 $+ %color2 Pop server address: $+ %color1 Checking set %checking.server pop dns %pop } else { if $window(@E-MailáSetup).state == normal rline @E-MailáSetup 4 $+ %color2 Mail Transfer address: $+ %color1 Checking set %checking.server smtp dns %smtp } .timer300 1 60 invalid } #checkdomain off alias currentaddress return %currentaddress on 1:dns: { .timer300 off if %checking.server == pop { if $raddress == $null { if $window(@E-MailáSetup).state == normal rline @E-MailáSetup 3 $+ %color2 Pop server address:4 Bad Address | unset %pop.ip $+ $currentaddress | goto done } if $window(@E-MailáSetup).state == normal rline @E-MailáSetup 3 $+ %color2 Pop server address: $+ %color1 %pop $+ %color2 $+ ok set %pop.ip $+ %currentaddress $longip($raddress) } else { if $raddress == $null { if $window(@E-MailáSetup).state == normal rline @E-MailáSetup 4 $+ %color2 Mail Transfer address:4 Bad Address | unset %smtp.ip | unset %smtp | goto done } if $window(@E-MailáSetup).state == normal rline @E-MailáSetup 4 $+ %color2 Mail Transfer address: $+ %color1 %smtp $+ %color2 $+ ok set %smtp.ip $longip($raddress) } :done .disable #checkdomain halt } #checkdomain end alias pass { set %pass "" if %hide == true set %pass $left($len(%password),*****************) else set %pass %password return %pass unset %pass } alias delemail { set %request $$?="Enter Address You wish to Remove" set %okadd 0 unset %deleted for 1 5 deleteemail } alias loop return %loop alias deleteemail { if %emailaddress [ $+ [ %loop ] ] != $null inc %okadd if %emailaddress [ $+ [ %loop ] ] == %request { unset %emailaddress $+ $loop unset %password $+ $loop unset %pop.ip $+ $loop unset %pop $+ $loop set %deleted $true if %currentaddress == %loop email } if %loop == 5 && %okadd <= 5 { set %newaddress Add Address } if %loop == 5 && %okadd == 1 && %deleted { unset %removeaddress } } alias activateaddress { set %email %emailaddress [ $+ [ $1 ] ] if %password [ $+ [ $1 ] ] == $null set %password None Set else set %password %password [ $+ [ $1 ] ] if %pop [ $+ [ $1 ] ] == $null set %pop None Set else set %pop %pop [ $+ [ $1 ] ] set %currentaddress $1 email } alias newemail { set %okadd 0 set %doneone $false for 1 5 checkaddresses } alias checkaddresses { if %emailaddress [ $+ [ %loop ] ] != $null inc %okadd if %emailaddress [ $+ [ %loop ] ] == $null && %doneone == $false { set %emailaddress [ $+ [ %loop ] ] $$?="Enter New E-Mail Address" if %removeaddress == $null set %removeaddress Remove Address activateaddress %loop set %doneone $true } if %okadd == 4 && %loop == 5 unset %newaddress } menu @E-MailáChecker { dclick F1 Next message:F1 - Delete Message:F2 %reply.button:F4 Forward Message:forward Skip to Message:set %number $$?="Skip to what message?" | F1 - Close:window -c @E-MailáChecker | close -c $me } alias donefor { set %loop $1 set %done no :loop if %done == $null goto end *2 inc %loop goto loop :end } alias for { set %loop $1 :loop if %loop > $2 goto end *3 inc %loop goto loop :end } alias invalid { close -c $me .timer300 off echo 2 - echo 4 -s Connection to mail server timed out echo %color2 -s Please try one of the following to obtain a connection: echo %color1 -s 1: $+ %color2 Try entering the Mail prefix ex: $+ %color3 $+ mail $+ %color2 $+ .geocities.com echo %color1 -s 2: $+ %color2 Make sure you have entered only the domain echo %color1 -s 3: $+ %color2 Be sure you are attempting to connect to a POP3 or SMTP account echo %color1 -s 4: $+ %color2 Attempt connection later echo %color1 -s 5: $+ %color2 Outgoing email, press $+ %color4 Shift+F2 $+ %color2 to retry same message echo %color3 -s You may press $+ %color2 F5 $+ %color3 to re-enter your server addresses echo 2 - .disable #checkdomain .disable #check .disable #mail }