It seems to me that someone has already done something similar on this forum. All you would really need is a SMTP script that sends an email to the sms email address. Search this forum for SMTP and you might find something useful.
-genius_at_work
Interesting, and the script was made by yourself even!

Here is your script in an updated, and ready to use form.
on 1:TEXT:!sms*:#:{
if (%report.buffer) {
notice $nick A text has already been sent to YOUR_USER_NAME less than 5 minutes ago!
return
}
else { /sendmail $nick says: $2-
}
set -u300 %report.buffer 1
notice $nick Sending YOUR_USER_NAME your text message, $nick $+ .
sendmail
}
alias sendmail {
if (%sndmail.busy) {
echo -a Already sending. Try again later.
return -1
}
set %sndmail.busy 1
.timersmtp 1 5 mailsockclose sendmail
;------ SERVER SETTINGS ------
set %sndmail.smtpserver smtp.yourisp.net
set %sndmail.smtpport 25
set %sndmail.doauth $false
set %sndmail.authuser SMTP_USER_NAME
set %sndmail.authpass SMTP_USER_PASSWORD
set %sndmail.debug $true
;------ SET THESE VALUES THEN CALL /sendmail -----
set %sndmail.fromaddress youremail@yourisp.net
set %sndmail.toaddress YOUR_SMS_EMAIL_ADDRESS
;------
;
set %sndmail.body $1-
set %sndmail.logfile $+(maillog.,$asctime(dd.mm.yyyy),.txt)
set %sndmail.state 1
if ($sock(sendmail)) sockclose sendmail
write %sndmail.logfile # Connect Attempt to %sndmail.smtpserver $+ : %sndmail.smtpport
sockopen sendmail %sndmail.smtpserver %sndmail.smtpport
}
;
on *:sockread:sendmail:{
var %temptext
sockread %temptext
tokenize 32 %temptext
;echo 2 -a %sndmail.state > $1-
.timersmtp 1 5 mailsockclose $sockname
write %sndmail.logfile $asctime(HH:nn:ss) -> $1-
if ((%sndmail.state == 1) && ($1 == 220)) {
mailsockwrite EHLO localhost
maildebug 220 -> EHLO (Introduce ourselves)
%sndmail.state = 2
}
elseif ((%sndmail.state == 2) && ($left($1,4) == 250-)) {
; Do nothing
}
elseif ((%sndmail.state == 2) && ($1 == 250)) {
if (%sndmail.doauth) {
mailsockwrite AUTH LOGIN
maildebug 250 -> AUTH LOGIN (Begin authentication)
%sndmail.state = 3
}
else {
mailsockwrite MAIL From: $+ %sndmail.fromaddress
maildebug 250 -> MAIL (Auth OK; Specify FROM address)
%sndmail.state = 6
}
}
elseif ((%sndmail.state == 3) && ($1 == 334)) {
mailsockwrite $encode(%sndmail.authuser,m)
maildebug 334 -> $encode(%sndmail.authuser,m) (Send Base64 encoded username)
%sndmail.state = 4
}
elseif ((%sndmail.state == 4) && ($1 == 334)) {
mailsockwrite $encode(%sndmail.authpass,m)
maildebug 334 -> $encode(%sndmail.authpass,m) (Send Base64 encoded password)
%sndmail.state = 5
}
elseif ((%sndmail.state == 5) && ($1 == 535)) {
mailsockwrite QUIT
maildebug 535 -> QUIT (Auth failed; Disconnect)
%sndmail.state = -1
}
elseif ((%sndmail.state == 5) && ($1 == 235)) {
mailsockwrite MAIL From: $+ %sndmail.fromaddress
maildebug 250 -> MAIL (Auth OK; Specify FROM address)
%sndmail.state = 6
}
elseif ((%sndmail.state == 6) && ($1 == 250)) {
mailsockwrite RCPT To: $+ %sndmail.toaddress
maildebug 250 -> RCPT (Specify TO address)
%sndmail.state = 7
}
elseif ((%sndmail.state == 7) && ($1 == 250)) {
mailsockwrite DATA
maildebug 250 -> DATA (Initiate BODY specification)
%sndmail.state = 8
}
elseif ((%sndmail.state == 8) && ($1 == 354)) {
mailsockwrite Subject: %sndmail.subject
mailsockwrite $crlf
mailsockwrite %sndmail.body
mailsockwrite .
maildebug 354 -> SEND (Specify BODY data; Send email)
%sndmail.state = 9
}
elseif ((%sndmail.state == 9) && ($1 == 250)) {
mailsockwrite QUIT
maildebug 250 -> QUIT (Email accepted; Disconnect)
%sndmail.state = -1
}
elseif ((%sndmail.state < 0) && ($1 == 221)) {
sockclose $sockname
maildebug 221 (Quit successful)
unset %sndmail.*
}
else {
mailsockwrite QUIT
maildebug -> QUIT (Unhandled result; Disconnect)
maildebug ** 4ERROR: $1-
set %sndmail.state -1
}
}
;
alias mailsockwrite {
sockwrite -n $sockname $1-
write %sndmail.logfile $asctime(HH:nn:ss) <- $1-
}
alias maildebug { if (%sndmail.debug) echo 3 -at $1- }
alias mailsockclose {
if ($sock($1)) mailsockwrite $1 QUIT
.timersmtp2 1 3 mailsockcleanup $1
}
alias mailsockcleanup {
if ($sock($1)) sockclose $1
unset %sndmail.*
}
on *:START:{ unset %sndmail.* }
Original thread
here.All credit goes to genius_at_work!
Thanks!
