mIRC Homepage
Posted By: xrn0id looking for an email dill - 23/02/03 02:57 PM
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.
Posted By: xrn0id Re: looking for an email dill - 23/02/03 05:38 PM
lol oops, food on my mind... *dll
Posted By: NightChillz Re: looking for an email dill - 24/02/03 01:57 AM
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....
Posted By: xrn0id Re: looking for an email dill - 24/02/03 02:00 AM
how can i find that correct info?
Posted By: Hammer Re: looking for an email dill - 24/02/03 03:23 AM
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.
Posted By: xrn0id Re: looking for an email dill - 24/02/03 04:00 AM
ok thanks man. smile
Posted By: xrn0id Re: looking for an email dill - 24/02/03 04:07 AM
you know of one i could use?
Posted By: Hammer Re: looking for an email dill - 24/02/03 04:10 AM
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.
Posted By: xrn0id Re: looking for an email dill - 24/02/03 04:13 AM
not script, a smtp server.
Posted By: Hammer Re: looking for an email dill - 24/02/03 04:18 AM
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
Posted By: xrn0id Re: looking for an email dill - 24/02/03 05:12 AM
i have outlook, i know my smtp server, but whne I send the mail FROM <email> it says invalid perimeters
© mIRC Discussion Forums