mIRC Home    About    Download    Register    News    Help

Print Thread
#12662 23/02/03 02:57 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
im looking for a dill i can use to make a mili email program, bascially all i want to do is send an email, i dont half to recieve.



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
lol oops, food on my mind... *dll



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 271
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
i dont think you need a dll to do that, just find an email server, and sockopen to that, then sockwrite the corrent info to send an email....

Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
how can i find that correct info?



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Simple Mail Transfer Protocol - RFC 821 has all of the relevelant information you need to send an email message. You will need to read through it to really get an idea of what you're trying to do. Here are the basic steps to get you started:
  1. Open a socket to your SMTP server (usually on port 25).
  2. HELO (or EHLO)
  3. MAIL FROM your[/b]@return address
  4. RCPT TO first[/b]@recipient
  5. RCPT TO second[/b]@recipient
  6. DATA
  7. Email headers go here
  8. $crlf
  9. Body of the email goes here
  10. $crlf $+ . $+ $crlf
  11. QUIT
At each step of the way, you will have to wait for the server to respond (except during the DATA section when it waits for your DATA section to be complete). The server will respond with numerics that tell your script if a command failed or succeeded.

I've found that it's simplest to create a dialog for the email user interface and write the results to a file. That way, you can keep track of which line you're on in the sending process and send the correct data and the correct time. MOST of your socket script will be in the on SOCKREAD event, responding to the numerics you receive from the server and then sending out the next line.

You "can" just use timers to send the data without waiting for the server to reply to you, but you can occasionally get messages sent the server is not ready for (the error you receive is something like "lines out of order").

This page might also help you better understand how SMTP works.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
ok thanks man. smile



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
you know of one i could use?



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
It's pretty simple to write one. I wrote one several years ago for a specific script (so it's not exactly portable) that only took like 12 or 13 lines (LONG lines) and only about 3KB total.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
not script, a smtp server.



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Do you have an email client, such as Outlook (Express), Eudora or Nutscrape Communicator (or whatever they call theirs)? If you do, then you can go into your email client and see what you have set up in it for your SMTP server. THAT is the server you open the socket to. smile


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
i have outlook, i know my smtp server, but whne I send the mail FROM <email> it says invalid perimeters



;Check for Life

if (%life == $null) {
goto getlife
}

Link Copied to Clipboard