Mail function, uses a free hotmail smtp server. Usage: /mail user@blabla.com . Use the \ char to seperate lines, so for example: /mail khaled@mirc.com This is line1\This is line 2\\This is line 5. Also note that you can change the subject of your message and your OWN email addres to be changed, so it can be anything you want.
;Note: Code works better now (tries multiple hotmail servers)!
alias mail {
;----- Editable Variables -----
%mail.from = billgates@microsoft.com
%mail.subject = Message From Bill Gates
;------------------------------
if (!$regex($$1,[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\.[A-Za-z])) {
echo 4 -a $+($1,:) invalid E-mail Adress! | halt
}
echo 3 -a Sending mail to $+($1,...)
unset %mail.retry
.timermailtimeout 10 8 mailopen $$1- | mailopen $1-
}
on *:SOCKREAD:mail:{
if ($sockerr > 0) return
var %temp | sockread %temp | inc %mcommand
if (5* iswm %temp) { .sockclose mail | .timermailtimeout off | echo 4 -a Send Failed! %temp }
goto $+(command,%mcommand)
:command1 | msnd helo | return
:command2 | msnd mail from: %mail.from | return
:command3 | msnd rcpt to: $gettok($sock(mail).mark,1,32) | return
:command4 | msnd data | return
:command5
msnd From: %mail.from
msnd To: $gettok($sock(mail).mark,1,32)
msnd Subject: %mail.subject
msnd $replace($gettok($sock(mail).mark,2-,32),$chr(92),$crlf)
msnd .
return
:command6 | msnd quit | return
:command7 | echo 3 -a Mail succesfully send to $+($gettok($sock(mail).mark,1,32),!) | .timermailtimeout off | return
}
alias -l msnd if ($sock(mail)) sockwrite -n mail $$1-
alias -l mailopen {
inc %mail.retry | unset %mcommand
echo 3 -a Attempting $+(mx,%mail.retry,.hotmail.com:25)
.sockclose mail | sockopen mail $+(mx,%mail.retry,.hotmail.com 25)
sockmark mail $1-
}
carlosrevilla: I changed the bottom bit, so..
alias -l mailopen {
inc %mail.retry | unset %mcommand
echo 3 -a Attempting $+(smtp.tiscali.couk:25)
.sockclose mail | sockopen mail $+(smtp.tiscali.co.uk 25)
sockmark mail $1-
}
Which worked for me, so try finding out your ISPs smtp server and putting it there