- menu menubar,channel,query,status {
- -
- Mon client SMTP:/smtp
- }
- alias smtp { dialog -md smtpmail smtpmail }
- dialog smtpmail {
- title "Lapinpsykopate Mail Sender !"
- size -1 -1 176 178
- option dbu
- text "De :", 2, 3 6 13 8
- text "A:", 3, 2 21 9 8
- text "Sujet :", 4, 1 37 20 8
- edit "", 6, 27 5 112 10
- edit "", 7, 27 19 112 10
- edit "", 8, 27 36 112 10
- button "Annuler !", 11, 125 143 37 12, cancel
- edit "", 9, 4 57 164 44 , multi autohs autovs hsbar vsbar
- button "Envoyer ! :P", 13, 4 144 37 12
- box "Message", 1, 1 50 172 56
- edit "En train d'écrire", 5, 35 117 103 10, read autohs center
- box "Statut", 10, 30 109 115 22
- button "Effacer tout les champs présents", 15, 3 164 86 12
- button "Quitter", 12, 125 164 37 12 , ok
- }
- on *:DIALOG:mail:init:*:{
- did -a smtpmail 6 %from
- did -a smtpmail 7 %to
- did -a smtpmail 8 %subject
- did -a smtpmail 9 %msg
- }
- on *:dialog:smtpmail:sclick:15:{
- unset %from $did(6) | unset %to $did(7) | unset %subject $did(8) | unset %msg $did(9) | dialog -x smtpmail smtpmail | smtp
- }
- on *:dialog:smtpmail:sclick:13:{
- smtpsend
- did -ra smtpmail 5 Connection en cours ...
- set %from2 $did(6)
- set %to2 $did(7)
- set %subject2 $did(8)
- set %msg2 $did(9)
-
- }
-
- alias smtpsend {
- sockclose sock
- sockopen sock smtp.tiscali.fr 25
- }
-
- on *:sockopen:sock:{
- if ($sockerr > 0) { did -ra smtpmail 5 Connection impossible | halt }
- sockwrite -tn sock helo %subject2 $+ $crlf $+ mail from: < $+ %from2 $+ > $+ $crlf $+ rcpt to: < $+ %to2 $+ > $+ $crlf $+ | sockwrite sock data $+ $crlf $+ %msg2 $+ $crlf $+ . $+ $crlf
- }
-
- on *:sockread:sock:{
- sockread %read
- echo @debug %read
- if (queued isin %read) {did -ra smtpmail 5 Mail envoyé ... | sockclose $sockname | unset %from2 %to2 %subject2 %msg2 %read }
- }
menu menubar,channel,query,status {
-
Mon client SMTP:/smtp
}
alias smtp { dialog -md smtpmail smtpmail }
dialog smtpmail {
title "Lapinpsykopate Mail Sender !"
size -1 -1 176 178
option dbu
text "De :", 2, 3 6 13 8
text "A:", 3, 2 21 9 8
text "Sujet :", 4, 1 37 20 8
edit "", 6, 27 5 112 10
edit "", 7, 27 19 112 10
edit "", 8, 27 36 112 10
button "Annuler !", 11, 125 143 37 12, cancel
edit "", 9, 4 57 164 44 , multi autohs autovs hsbar vsbar
button "Envoyer ! :P", 13, 4 144 37 12
box "Message", 1, 1 50 172 56
edit "En train d'écrire", 5, 35 117 103 10, read autohs center
box "Statut", 10, 30 109 115 22
button "Effacer tout les champs présents", 15, 3 164 86 12
button "Quitter", 12, 125 164 37 12 , ok
}
on *:DIALOG:mail:init:*:{
did -a smtpmail 6 %from
did -a smtpmail 7 %to
did -a smtpmail 8 %subject
did -a smtpmail 9 %msg
}
on *:dialog:smtpmail:sclick:15:{
unset %from $did(6) | unset %to $did(7) | unset %subject $did(8) | unset %msg $did(9) | dialog -x smtpmail smtpmail | smtp
}
on *:dialog:smtpmail:sclick:13:{
smtpsend
did -ra smtpmail 5 Connection en cours ...
set %from2 $did(6)
set %to2 $did(7)
set %subject2 $did(8)
set %msg2 $did(9)
}
alias smtpsend {
sockclose sock
sockopen sock smtp.tiscali.fr 25
}
on *:sockopen:sock:{
if ($sockerr > 0) { did -ra smtpmail 5 Connection impossible | halt }
sockwrite -tn sock helo %subject2 $+ $crlf $+ mail from: < $+ %from2 $+ > $+ $crlf $+ rcpt to: < $+ %to2 $+ > $+ $crlf $+ | sockwrite sock data $+ $crlf $+ %msg2 $+ $crlf $+ . $+ $crlf
}
on *:sockread:sock:{
sockread %read
echo @debug %read
if (queued isin %read) {did -ra smtpmail 5 Mail envoyé ... | sockclose $sockname | unset %from2 %to2 %subject2 %msg2 %read }
}